Changeset 391 for python/trunk/Doc/reference/lexical_analysis.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/reference/lexical_analysis.rst
r2 r391 358 358 359 359 .. versionchanged:: 2.5 360 Both :keyword:`as` and :keyword:`with` are only recognized when the361 ``with_statement`` future feature has been enabled. It will always be enabled in362 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. 365 365 366 366 … … 387 387 388 388 ``__*__`` 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. 394 395 395 396 ``__*`` … … 426 427 stringliteral: [`stringprefix`](`shortstring` | `longstring`) 427 428 stringprefix: "r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR" 429 : | "b" | "B" | "br" | "Br" | "bR" | "BR" 428 430 shortstring: "'" `shortstringitem`* "'" | '"' `shortstringitem`* '"' 429 431 longstring: "'''" `longstringitem`* "'''" … … 458 460 Unicode character set as defined by the Unicode Consortium and ISO 10646. Some 459 461 additional 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'``. 462 A prefix of ``'b'`` or ``'B'`` is ignored in Python 2; it indicates that the 463 literal should become a bytes literal in Python 3 (e.g. when code is 464 automatically converted with 2to3). A ``'u'`` or ``'b'`` prefix may be followed 465 by an ``'r'`` prefix. 462 466 463 467 In triple-quoted strings, unescaped newlines and quotes are allowed (and are … … 526 530 Any Unicode character can be encoded this way, but characters outside the Basic 527 531 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). 530 533 531 534 (3)
Note:
See TracChangeset
for help on using the changeset viewer.