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

Yury Selivanov yselivanov.ml at gmail.com
Fri May 22 04:13:37 CEST 2015


Hi Ben,

On 2015-05-21 10:10 PM, Ben Hoyt wrote:
> Hmmm, yeah, I think you're basically suggesting macro-like processing
> of the AST. Pretty cool, but not quite what I was thinking of ... I
> was thinking select() would get an AST object at runtime and do stuff
> with it.


Unfortunately, it's not that easy.  Storing AST would require
a lot of extra memory in runtime.  You have to somehow mark
the places where you need it syntactically.

I like how it's done in Rust: select!( ... )

Yury


More information about the Python-ideas mailing list