diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-10-21 18:57:36 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-10-21 18:57:36 (GMT) |
commit | 931b8aac8058cf2b0eb4349217893aaf16f23444 (patch) | |
tree | 5cbd87e3f2c4018e1382c811c6ae214d1400396f /Doc/reference | |
parent | 3764a964ca4e8c979743ba8c2f08b65ddf8b0070 (diff) | |
download | cpython-931b8aac8058cf2b0eb4349217893aaf16f23444.zip cpython-931b8aac8058cf2b0eb4349217893aaf16f23444.tar.gz cpython-931b8aac8058cf2b0eb4349217893aaf16f23444.tar.bz2 |
#12753: Add support for Unicode name aliases and named sequences.
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/lexical_analysis.rst | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst index 4b49738..5900daa 100644 --- a/Doc/reference/lexical_analysis.rst +++ b/Doc/reference/lexical_analysis.rst @@ -492,13 +492,13 @@ Escape sequences only recognized in string literals are: +-----------------+---------------------------------+-------+ | Escape Sequence | Meaning | Notes | +=================+=================================+=======+ -| ``\N{name}`` | Character named *name* in the | | +| ``\N{name}`` | Character named *name* in the | \(4) | | | Unicode database | | +-----------------+---------------------------------+-------+ -| ``\uxxxx`` | Character with 16-bit hex value | \(4) | +| ``\uxxxx`` | Character with 16-bit hex value | \(5) | | | *xxxx* | | +-----------------+---------------------------------+-------+ -| ``\Uxxxxxxxx`` | Character with 32-bit hex value | \(5) | +| ``\Uxxxxxxxx`` | Character with 32-bit hex value | \(6) | | | *xxxxxxxx* | | +-----------------+---------------------------------+-------+ @@ -516,10 +516,14 @@ Notes: with the given value. (4) + .. versionchanged:: 3.3 + Support for name aliases [#]_ has been added. + +(5) Individual code units which form parts of a surrogate pair can be encoded using this escape sequence. Exactly four hex digits are required. -(5) +(6) Any Unicode character can be encoded this way, but characters outside the Basic Multilingual Plane (BMP) will be encoded using a surrogate pair if Python is compiled to use 16-bit code units (the default). Exactly eight hex digits @@ -706,3 +710,8 @@ The following printing ASCII characters are not used in Python. Their occurrence outside string literals and comments is an unconditional error:: $ ? ` + + +.. rubric:: Footnotes + +.. [#] http://www.unicode.org/Public/6.0.0/ucd/NameAliases.txt |