[Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

Steven D'Aprano steve at pearwood.info
Tue Aug 14 04:10:19 CEST 2012


On 14/08/12 06:46, Guido van Rossum wrote:
> On Mon, Aug 13, 2012 at 1:05 PM, fwierzbicki at gmail.com
> <fwierzbicki at gmail.com>  wrote:
>> On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon<brett at python.org>  wrote:
>>>> 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).
>
> [Jython]
>> 2.5+ contains an ast.py that I obsessively compared to CPython's 2.5
>> ast.py.
>
> But CPython's ast.py contains very little code -- it's all done in ast.c.
>
> Still, I'm glad you are actually considering this a cross-language
> feature, and I will gladly retract my warning. (Still, I don't know if
> it is subject to the usual backward compatibility constraints.)

Well, that's Jython. What about IronPython, TinyPy, CLPython, etc. and
future implementations?

Perhaps ast should be considered a quality of implementation module.
Lack of one does not disqualify from being "Python", but it does make it
a second-class implementation.




-- 
Steven


More information about the Python-Dev mailing list