> > On 5/24/05, Ka-Ping Yee <[EMAIL PROTECTED]> wrote: > > > > > >> Would there be any interest in extending the compiler package with > >> tools > >> for AST transformations and for emitting Python source code from > >> ASTs?
the astng package from logilab's common library [1] extends compiler AST nodes with a bunch of methods, including a as_string method on each node allowing to regenerate a python source code from an ast (other methods are mainly to ease navigation in the tree or to extract higher level information from it). Currently it's implemented as a node's method instead of using a visitor pattern or the like, but that would be easily done. [1] http://www.logilab.org/projects/common/ -- Sylvain Thénault LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org _______________________________________________ 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