[Python-Dev] AST manipulation and source code generation

Ka-Ping Yee python-dev at zesty.ca
Tue May 24 08:22:06 CEST 2005

Would there be any interest in extending the compiler package with tools
for AST transformations and for emitting Python source code from ASTs?

I was experimenting with possible translations for exception chaining
and wanted to run some automated tests, so i started playing around
with the compiler package to do source-to-source transformations.
Then i started working on a way to do template-based substitution of
ASTs and a way to spit source code back out, and i'm wondering if
that might be good for experimenting with future Python features.

(If there's already stuff out there for doing this, let me know --
i don't intend to duplicate existing work.)

-- ?!ng

More information about the Python-Dev mailing list