summaryrefslogtreecommitdiffstats
path: root/Doc/library/ast.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-11-08 17:05:00 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-11-08 17:05:00 (GMT)
commitec9199be08e832edb5f432fa56270ef65f97fb83 (patch)
treea39096211714cf8c18ff0459b461427e402395ea /Doc/library/ast.rst
parentbeef207ad0e3a1b0a0ed3a5fbd7269afa881f9a0 (diff)
downloadcpython-ec9199be08e832edb5f432fa56270ef65f97fb83.zip
cpython-ec9199be08e832edb5f432fa56270ef65f97fb83.tar.gz
cpython-ec9199be08e832edb5f432fa56270ef65f97fb83.tar.bz2
Merged revisions 67162 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67162 | benjamin.peterson | 2008-11-08 10:55:33 -0600 (Sat, 08 Nov 2008) | 1 line a few compile() and ast doc improvements ........
Diffstat (limited to 'Doc/library/ast.rst')
-rw-r--r--Doc/library/ast.rst11
1 files changed, 5 insertions, 6 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index 8590a48..88c0228 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -15,13 +15,12 @@ abstract syntax grammar. The abstract syntax itself might change with each
Python release; this module helps to find out programmatically what the current
grammar looks like.
-An abstract syntax tree can be generated by passing :data:`_ast.PyCF_ONLY_AST`
-as a flag to the :func:`compile` builtin function, or using the :func:`parse`
+An abstract syntax tree can be generated by passing :data:`ast.PyCF_ONLY_AST` as
+a flag to the :func:`compile` builtin function, or using the :func:`parse`
helper provided in this module. The result will be a tree of objects whose
-classes all inherit from :class:`ast.AST`.
+classes all inherit from :class:`ast.AST`. An abstract syntax tree can be
+compiled into a Python code object using the built-in :func:`compile` function.
-A modified abstract syntax tree can be compiled into a Python code object using
-the built-in :func:`compile` function.
Node classes
------------
@@ -113,7 +112,7 @@ and classes for traversing abstract syntax trees:
.. function:: parse(expr, filename='<unknown>', mode='exec')
Parse an expression into an AST node. Equivalent to ``compile(expr,
- filename, mode, PyCF_ONLY_AST)``.
+ filename, mode, ast.PyCF_ONLY_AST)``.
.. function:: literal_eval(node_or_string)