[Python-Dev] IronPython and AST branch (original) (raw)

Brett Cannon brett at python.org
Sat Sep 16 20:33:56 CEST 2006


On 9/13/06, Sanghyeon Seo <sanxiyn at gmail.com> wrote:

CPython 2.5, which will be released Real Soon Now, is the first version to ship with new "AST branch", which have been in development for a long time. AST branch uses ASDL, Abstract Syntax Description Language http://asdl.sourceforge.net/ to describe Abstract Syntax Tree data structure used by CPython compiler. In theory this is language independant, and the same file could be used to generate C# source files.

It would be nice, but see below.

Having the same AST for Python implementations will be good for

applications and libraries using Python implementations's internal parsers and compilers. Currently, those using CPython parser module or compiler package can't be easily ported to IronPython.

What do you think?

I have talked to Jim Hugunin about this very topic at the last PyCon. He pointed out that IronPython was started before he knew about the AST branch so that's why he didn't use it. Plus, by the time he did know, it was too late to switch right then and there.

As for making the AST branch itself more of a standard, I have talked to Jeremy Hylton about that and he didn't like the idea, at least for now. The reasons for keeping it as "experimental" in terms of exposure at the Python level is that we do not want to lock ourselves down to some AST spec that we end up changing in the future. It's the same reasoning behind not officially documenting the marshal format; we want the flexibility.

How best to resolve all of this, I don't know. I completely understand not wanting to lock ourselves down to an AST too soon. Might need to wait a little while after the AST has been out in the wild to see what the user response is and then make a decision.

-Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060916/81f42b9e/attachment.htm



More information about the Python-Dev mailing list