[issue11549] Rewrite peephole to work on AST

Nick Coghlan report at bugs.python.org
Tue Mar 29 12:47:01 CEST 2011


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Eugene: I suggest raising the question on python-dev. The answer potentially affects the PEP 380 patch as well (which adds a new attribute to the "Yield" node).

Anatoly: If you just want to get a feel for the kind of AST various pieces of code produce, then the "ast.dump" function (along with using the ast.PyCF_ONLY_AST flag in compile) may be enough.

You may also want to take a look at the AST -> dot file conversion code in Dave Malcolm's patches on #10399.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11549>
_______________________________________


More information about the Python-bugs-list mailing list