blob: 8a7109006df874451f62f76c30a5a912993afc44 [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +00001:mod:`symbol` --- Constants used with Python parse trees
2========================================================
3
4.. module:: symbol
5 :synopsis: Constants representing internal nodes of the parse tree.
6.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
7
Éric Araujo29a0b572011-08-19 02:14:03 +02008**Source code:** :source:`Lib/symbol.py`
9
10--------------
Georg Brandl8ec7f652007-08-15 14:28:01 +000011
12This module provides constants which represent the numeric values of internal
13nodes of the parse tree. Unlike most Python constants, these use lower-case
14names. Refer to the file :file:`Grammar/Grammar` in the Python distribution for
15the definitions of the names in the context of the language grammar. The
16specific numeric values which the names map to may change between Python
17versions.
18
19This module also provides one additional data object:
20
21
22.. data:: sym_name
23
24 Dictionary mapping the numeric values of the constants defined in this module
25 back to name strings, allowing more human-readable representation of parse trees
26 to be generated.
27