> However, I'm not sure we *can* do a general-purpose AST transformation
> that handles both new nodes and changes to existing nodes correctly
> for all applications.

As long as both versions contain the same information we can write a
transformation that does a near-perfect job.
E.g. for my changes I can write a convertor that produces AST in
almost the same form as the current one, the only change being the new
'docstring' attribute set to None. (That's for converting AST before
optimizations, after optimizations it can contain nodes that couldn't
be represented before). I believe it's similar for Try change that
Benjamin mentioned above.

Also, if written in Python, conversion can at least serve as a
template even if it doesn't work out of the box.

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