[issue26146] PEP 511: Add ast.Constant to allow AST optimizer to emit constants

STINNER Victor report at bugs.python.org
Thu Jan 21 12:02:57 EST 2016


STINNER Victor added the comment:

> We also make no backwards-compatibility guarantees about the AST, so if it simplifies things to switch entirely to Constant from Num, etc. then I said do it.

Replacing Num/Str/... with Constant causes bug in markerlib (used by pip, it breaks indirectly the venv module of the stdlib) and Chameleon benchmark. I only found these projects by mistake. I'm quite sure that much more code rely on the AST "API" even if it's unstable.

I prefer to not break the API for free :-)

----------

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


More information about the Python-bugs-list mailing list