using Python's AST generator for other languages

eliben eliben at
Fri Jul 11 07:27:24 CEST 2008

> > 2) What is the meaning of the comment in ? Are the Python
> > maintainers unhappy with the design of the AST ?3
> Node, I think, is talking about a node in the parse tree. (AST is
> generated from another parse tree.) See PEP 339 for details.

Thanks, PEP 339 clarified a lot to me. I wonder, though, at the need
for two Python compilation frameworks in the same code base. While
CPython uses the flow described in PEP 339 (parsing to an AST
generated from ASDL), the compiler module of the standard library
takes a different approach, with a custom AST description syntax in
Why aren't the two methods unified. I.e. can't the compiler.ast module
be also generated from ASDL, and provide a more unified interface to
the real thing ?


More information about the Python-list mailing list