[Python-Dev] Policy for making changes to the AST

Benjamin Peterson benjamin at python.org
Thu Apr 7 23:56:52 CEST 2011


2011/4/7 Maciej Fijalkowski <fijall at gmail.com>:
>> AFAIK the AST is
>> CPython-specific so should be treated with the same attitude as
>> changes to the bytecode. That means, do it conservatively, since there
>> *are* people who like to write tools that manipulate or analyze this,
>> and while they know they're doing something CPython and
>> version-specific, they should not be broken by bugfix releases, since
>> the people who *use* their code probably have no idea of the deep
>> magic they're depending on.
>
> PyPy implements exactly the same AST. I think Jython also does,
> although I'm not that sure. There were already issues with say
> subclassing ast nodes were pypy was incompatible from CPython. That
> said, it's completely fine from PyPy's perspective to change AST
> between major releases.

Speaking as the author of PyPy's AST implementation, there are even
some changes I'd like to make it easier!



-- 
Regards,
Benjamin


More information about the Python-Dev mailing list