[Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)
Brett Cannon
brett at python.org
Mon Aug 13 21:06:23 CEST 2012
On Mon, Aug 13, 2012 at 3:00 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 8/13/2012 10:45 AM, Guido van Rossum wrote:
>
>> Not so fast. If you make this a language feature you force all Python
>> implementations to support an identical AST API. That's a big step.
>>
>
> I have been wondering about this. One could think from the manuals that we
> are there already. From the beginning of the ast chapter:
>
> "The ast module helps Python applications to process trees of *the* Python
> abstract syntax grammar. ... An abstract syntax tree can be generated by
> passing ast.PyCF_ONLY_AST as a flag to the compile() built-in function"
> (emphasis on *the* added).
>
> and the entry for compile(): "Compile the source into a code or AST
> object."
>
> I see nothing about ast possibly being CPython only. Should there be?
Time to ask the other VMs what they are currently doing (the ast module
came into existence in Python 2.6 so all the VMs should be answer the
question since Jython is in alpha for 2.7 compatibility).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120813/28871723/attachment.html>
More information about the Python-Dev
mailing list