On 5/26/05, Chad Whitacre <[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? > > Heh, so I guess the answer is "yes." > > BTW, how does the concept of AST transformations relate to the concept > of (Lisp) macros? Am I right to think that they are similar?
I think they are similar, but two key differences are: - An AST transformation can transform existing syntax but doesn't allow you to create new syntax. - An AST transformation has to be explicitly invoked. A macro is part of the language proper and has a semantics for how and when macros are evaluated. Jeremy _______________________________________________ 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