[Python-3000] [ANN] Python 3 Symbol Glossary
tjreedy at udel.edu
Sun Nov 2 02:52:43 CET 2008
Over the years, people have complained about the difficulty of finding
the meaning of symbols used in Python syntax. So ... I wrote a
Python 3 Symbol Glossary
There are .txt and .odt versions. The first is usable, the second is
nicer if you have an OpenDocFormat viewer or editor such as OpenOffice.
There is no .html because conversion mangles the format by deleting tabs .
From the Introduction:
The ascii character set includes non-printable control characters
(designated below with a '^' or '\' prefix), letters and digits, and
other printable symbols. A few of the control characters and most of the
symbols are used in Python code as operators, delimiters, or other
syntactic units. Some symbols are used alone, some in multi-symbol
units, and some in both. There are separate entries for each syntactic
unit and for each different use of a unit. In total, there are nearly
100 entries for over 50 symbols and combinations. Entries are in ascii
collating (sorting) order except that ?= entries (where ? is a symbol)
follow the one for ? (if there is one) and the general 'op=' entry
follows the one for =. The two lines after the entry for '\r\' are
entries for the invisible blank space ' '.
Most entries start with P, I, or S to indicate the syntactic unit's use
as a prefix, infix, or suffix. (These terms are here not limited to
operators.) If so, a template follows, with italicized words indicating
the type of code to be substituted in their place. Entries also have
additional explanations. Some syntactic units are split into two
subunits that enclose code. Entries for these are the same except that
two initials are used, PS or IS, depending on whether the first subunit
is a prefix or infix relative to the entire syntactic construct.
If I missed anything or made any errors, let me know.
PSF people are free to make any use of this they wish.
Terry Jan Reedy
More information about the Python-3000