summaryrefslogtreecommitdiffstats
path: root/Doc/reference/lexical_analysis.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-05 21:42:51 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-05 21:42:51 (GMT)
commite06de8b3cc279804f7f38a8002ca171094f83f55 (patch)
treee9b58dae5efa86f0c50fd0bdb68ce6354b670ceb /Doc/reference/lexical_analysis.rst
parent7694100e4b44a6dd965964af323e5e0c23ffc897 (diff)
downloadcpython-e06de8b3cc279804f7f38a8002ca171094f83f55.zip
cpython-e06de8b3cc279804f7f38a8002ca171094f83f55.tar.gz
cpython-e06de8b3cc279804f7f38a8002ca171094f83f55.tar.bz2
#2762: remove 2.x remnants and patch up some new documentation.
Diffstat (limited to 'Doc/reference/lexical_analysis.rst')
-rw-r--r--Doc/reference/lexical_analysis.rst17
1 files changed, 10 insertions, 7 deletions
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst
index 2a9fd79..5748b9e 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -270,16 +270,20 @@ Identifiers and keywords
.. index:: identifier, name
Identifiers (also referred to as *names*) are described by the following lexical
-definitions:
+definitions.
The syntax of identifiers in Python is based on the Unicode standard annex
-UAX-31, with elaboration and changes as defined below.
+UAX-31, with elaboration and changes as defined below; see also :pep:`3131` for
+further details.
Within the ASCII range (U+0001..U+007F), the valid characters for identifiers
-are the same as in Python 2.5; Python 3.0 introduces additional
-characters from outside the ASCII range (see :pep:`3131`). For other
-characters, the classification uses the version of the Unicode Character
-Database as included in the :mod:`unicodedata` module.
+are the same as in Python 2.x: the uppercase and lowercase letters ``A`` through
+``Z``, the underscore ``_`` and, except for the first character, the digits
+``0`` through ``9``.
+
+Python 3.0 introduces additional characters from outside the ASCII range (see
+:pep:`3131`). For these characters, the classification uses the version of the
+Unicode Character Database as included in the :mod:`unicodedata` module.
Identifiers are unlimited in length. Case is significant.
@@ -308,7 +312,6 @@ A non-normative HTML file listing all valid identifier characters for Unicode
4.1 can be found at
http://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html.
-See :pep:`3131` for further details.
.. _keywords: