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

Terry Reedy tjreedy at udel.edu
Mon Apr 4 18:19:15 CEST 2011


On 4/3/2011 10:02 PM, Guido van Rossum wrote:

> Sure, but do we have any indication that the warnings for dis make a difference?

I think there had been a few grumbles about bytecode not being stable. 
Without that, it is part of the newish effort to specify in the docs 
what is CPython specific. In http://bugs.python.org/issue11762
I propose a lighter version of the dis notice:

"CPython implementation detail: The ast definition is specific to the 
CPython interpreter! Ast nodes may be added, removed, or changed between 
versions. Use *ast.__version__* to work across versions."

and that ast.__version__ get a normal formal entry

ast.__version__
     String constant with version number of the abstract grammar file.
     3.1: '67616'; 3.2: '82163'; 3.3: 'xxxxxxxxx'

-- 
Terry Jan Reedy



More information about the Python-Dev mailing list