[Python-ideas] Enabling access to the AST for Python code

Andrew Barnert abarnert at yahoo.com
Sat Jul 4 09:13:31 CEST 2015


On Jul 3, 2015, at 13:42, Neil Girdhar <mistersheik at gmail.com> wrote:
> 
> There are a lot of messages in this discussion.  Was there a final consensus about how the AST for a given code object should be calculated? 

I think it depends on what exactly you're trying to do, but using an import hook means you can call compile or ast.parse once and keep it around as well as using it for the compile, so that seems like it should be a good solution for most uses.


More information about the Python-ideas mailing list