[issue10399] AST Optimization: inlining of function calls

Dave Malcolm report at bugs.python.org
Sat Nov 20 01:01:38 CET 2010


Dave Malcolm <dmalcolm at redhat.com> added the comment:

> Third, for that Graphviz output, was anything special required? If so, 
> I would toss the code into Tools for others to benefit from.
It's merely the "to_dot" function from Lib/__optimizer__.py (which turns an AST into .dot source code), followed by "dot_to_png" in the same file which invokes /usr/bin/dot on it, which is likely to be readily available on any Linux system.  Would it be reasonable to add "to_dot" to Lib/ast.py? (it's ~25 lines, and very similar to that file's "dump" function.

----------

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


More information about the Python-bugs-list mailing list