Skip to content

Commit de6d1af

Browse files
committed
Clean-ups
1 parent 6163c24 commit de6d1af

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Doc/reference/lexical_analysis.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ Non-ASCII characters in names
518518

519519
Besides ``A-Z``, ``a-z``, ``_`` and ``0-9``, names can use "letter-like"
520520
and "number-like" characters from outside the ASCII range,
521-
as detailed in this sections.
521+
as detailed in this section.
522522

523523
All names are converted into the `normalization form`_ NFKC while parsing.
524524
This means that, for example, some typographic variants of characters are
@@ -533,13 +533,13 @@ converted to their "basic" form, for example::
533533
Normalization is done at the lexical level only.
534534
Run-time functions that take names as *strings* generally do not normalize
535535
their arguments.
536-
For example, the variable defined above is accessible in the
536+
For example, the variable defined above is accessible at run time in the
537537
:func:`globals` dictionary as ``globals()["number"]`` but not
538538
``globals()["nᵘₘᵇₑʳ"]``.
539539

540540
The first character of a normalized identifier must be "letter-like".
541541
Formally, this means it must belong to the set ``id_start``,
542-
which is the union of:
542+
which is defined as the union of:
543543

544544
* Unicode category ``<Lu>`` - uppercase letters (includes ``A`` to ``Z``)
545545
* Unicode category ``<Ll>`` - lowercase letters (includes ``a`` to ``z``)
@@ -552,7 +552,8 @@ which is the union of:
552552
to support backwards compatibility
553553

554554
The remaining characters must be "letter-like" or "digit-like".
555-
Formally, they must belong to the set ``id_continue``, which is the union of:
555+
Formally, they must belong to the set ``id_continue``, which is defined as
556+
the union of:
556557

557558
* ``id_start`` (see above)
558559
* Unicode category ``<Nd>`` - decimal numbers (includes ``0`` to ``9``)
@@ -565,14 +566,14 @@ Formally, they must belong to the set ``id_continue``, which is the union of:
565566
Unicode categories use the version of the Unicode Character Database as
566567
included in the :mod:`unicodedata` module.
567568

568-
These sets are based on the Unicode standard annex `UAX-31`_.
569-
See also :pep:`3131` for further details.
569+
The ``id_start`` and ``id_continue`` sets are based on the Unicode standard
570+
annex `UAX-31`_. See also :pep:`3131` for further details.
571+
Note that Python does not necessarily conform to `UAX-31`_.
570572

571573
A non-normative listing of all valid identifier characters as defined by
572574
Unicode is available in the `DerivedCoreProperties.txt`_ file in the Unicode
573575
Character Database.
574576

575-
576577
.. _UAX-31: https://www.unicode.org/reports/tr31/
577578
.. _PropList.txt: https://www.unicode.org/Public/17.0.0/ucd/PropList.txt
578579
.. _DerivedCoreProperties.txt: https://www.unicode.org/Public/17.0.0/ucd/DerivedCoreProperties.txt

0 commit comments

Comments
 (0)