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

http://code.google.com/p/xploro/downloads/list
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.

Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to