Yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/AST Objects.html

From ZCubes Wiki
Revision as of 18:26, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<div class="navigation"> {| width="100%" cellspacing="2" align="center" | yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/AST Examples.html|[[Image:yurtta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


3.15.5 AST Objects

Ordered and equality comparisons are supported between AST objects. Pickling of AST objects (using the pickle module) is also supported.

ASTType
The type of the objects returned by expr(), suite() and sequence2ast().

AST objects have the following methods:

compile ([filename])
Same as compileast(ast, filename).
isexpr ()
Same as isexpr(ast).
issuite ()
Same as issuite(ast).
tolist ([line_info])
Same as ast2list(ast, line_info).
totuple ([line_info])
Same as ast2tuple(ast, line_info).

Send comments on this document to python-docs@python.org.