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

Maciej Fijalkowski fijall at gmail.com
Thu Apr 7 21:41:39 CEST 2011


> 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.


More information about the Python-Dev mailing list