summaryrefslogtreecommitdiffstats
path: root/Doc/library/ast.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-03 21:17:04 (GMT)
committerGeorg Brandl <georg@python.org>2009-01-03 21:17:04 (GMT)
commit36ab1ef8ee1006596937198e8f149e09ae8a6139 (patch)
tree604584365c107dcb5880f06d43b58f7580c55010 /Doc/library/ast.rst
parent45f53370e7724282f136db6e547cf48b79f9186b (diff)
downloadcpython-36ab1ef8ee1006596937198e8f149e09ae8a6139.zip
cpython-36ab1ef8ee1006596937198e8f149e09ae8a6139.tar.gz
cpython-36ab1ef8ee1006596937198e8f149e09ae8a6139.tar.bz2
Merged revisions 68219 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines Fix uses of the default role. ........
Diffstat (limited to 'Doc/library/ast.rst')
-rw-r--r--Doc/library/ast.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index 88c0228..b8bc896 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -178,7 +178,7 @@ and classes for traversing abstract syntax trees:
A node visitor base class that walks the abstract syntax tree and calls a
visitor function for every node found. This function may return a value
- which is forwarded by the `visit` method.
+ which is forwarded by the :meth:`visit` method.
This class is meant to be subclassed, with the subclass adding visitor
methods.
@@ -207,11 +207,11 @@ and classes for traversing abstract syntax trees:
A :class:`NodeVisitor` subclass that walks the abstract syntax tree and
allows modification of nodes.
- The `NodeTransformer` will walk the AST and use the return value of the
- visitor methods to replace or remove the old node. If the return value of
- the visitor method is ``None``, the node will be removed from its location,
- otherwise it is replaced with the return value. The return value may be the
- original node in which case no replacement takes place.
+ The :class:`NodeTransformer` will walk the AST and use the return value of
+ the visitor methods to replace or remove the old node. If the return value
+ of the visitor method is ``None``, the node will be removed from its
+ location, otherwise it is replaced with the return value. The return value
+ may be the original node in which case no replacement takes place.
Here is an example transformer that rewrites all occurrences of name lookups
(``foo``) to ``data['foo']``::