A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-May/054003.html below:

[Python-Dev] AST manipulation and source code generation

[Python-Dev] AST manipulation and source code generation [Python-Dev] AST manipulation and source code generationJeremy Hylton jhylton at gmail.com
Thu May 26 15:07:30 CEST 2005
On 5/26/05, Chad Whitacre <chad at zetaweb.com> 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4