> Ok, so it sounds like ast is *not* limited to CPython? That makes it
> harder to justify changing it just so as to ease the compilation
> process in CPython (as opposed to add new language features).

The changes above are not just for CPython, but to simplify processing
of AST in general, by reducing redundancy and separating syntax from
semantics. It just happens that the current structure of AST doesn't
allow important cases of constant folding at all, so I had to make
*some* changes. However, if the goal is to preserve the current AST as
much as possible, I can instead make a very simple completely backward
compatible change -- add one new node type that will never be present
in unoptimized AST. This is much less elegant and will add more cruft
to cpython's code (rather than removing it like the current patch
does), but it will work.

Eugene
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to