[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

Terry J. Reedy report at bugs.python.org
Mon Aug 13 23:29:51 CEST 2012


Terry J. Reedy added the comment:

In msg132312 Nick asked "where do we stand in regards to backwards compatibility of the AST?"

The current ast module chapter, second sentence, says ""The abstract syntax itself might change with each Python release;" this module helps to find out programmatically what the current grammar looks like."
where 'current grammar' is copied in 30.2.2. Abstract Grammar.

I do not know when that was written, but it clearly implies the the grammark, which defines node classes, is x.y version specific. I think this is the correct policy just so we can make changes, hopefully improvements, such as the one proposed here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11549>
_______________________________________


More information about the Python-bugs-list mailing list