Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/reference/lexical_analysis.rst

    r2 r391  
    358358
    359359.. versionchanged:: 2.5
    360    Both :keyword:`as` and :keyword:`with` are only recognized when the
    361    ``with_statement`` future feature has been enabled. It will always be enabled in
    362    Python 2.6.  See section :ref:`with` for details.  Note that using :keyword:`as`
    363    and :keyword:`with` as identifiers will always issue a warning, even when the
    364    ``with_statement`` future directive is not in effect.
     360   Using :keyword:`as` and :keyword:`with` as identifiers triggers a warning.  To
     361   use them as keywords, enable the ``with_statement`` future feature .
     362
     363.. versionchanged:: 2.6
     364    :keyword:`as` and :keyword:`with` are full keywords.
    365365
    366366
     
    387387
    388388``__*__``
    389    System-defined names.  These names are defined by the interpreter and its
    390    implementation (including the standard library); applications should not expect
    391    to define additional names using this convention.  The set of names of this
    392    class defined by Python may be extended in future versions. See section
    393    :ref:`specialnames`.
     389   System-defined names. These names are defined by the interpreter and its
     390   implementation (including the standard library).  Current system names are
     391   discussed in the :ref:`specialnames` section and elsewhere.  More will likely
     392   be defined in future versions of Python.  *Any* use of ``__*__`` names, in
     393   any context, that does not follow explicitly documented use, is subject to
     394   breakage without warning.
    394395
    395396``__*``
     
    426427   stringliteral: [`stringprefix`](`shortstring` | `longstring`)
    427428   stringprefix: "r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR"
     429               : | "b" | "B" | "br" | "Br" | "bR" | "BR"
    428430   shortstring: "'" `shortstringitem`* "'" | '"' `shortstringitem`* '"'
    429431   longstring: "'''" `longstringitem`* "'''"
     
    458460Unicode character set as defined by the Unicode Consortium and ISO 10646.  Some
    459461additional escape sequences, described below, are available in Unicode strings.
    460 The two prefix characters may be combined; in this case, ``'u'`` must appear
    461 before ``'r'``.
     462A prefix of ``'b'`` or ``'B'`` is ignored in Python 2; it indicates that the
     463literal should become a bytes literal in Python 3 (e.g. when code is
     464automatically converted with 2to3).  A ``'u'`` or ``'b'`` prefix may be followed
     465by an ``'r'`` prefix.
    462466
    463467In triple-quoted strings, unescaped newlines and quotes are allowed (and are
     
    526530   Any Unicode character can be encoded this way, but characters outside the Basic
    527531   Multilingual Plane (BMP) will be encoded using a surrogate pair if Python is
    528    compiled to use 16-bit code units (the default).  Individual code units which
    529    form parts of a surrogate pair can be encoded using this escape sequence.
     532   compiled to use 16-bit code units (the default).
    530533
    531534(3)
Note: See TracChangeset for help on using the changeset viewer.