[Python-Dev] AST manipulation and source code generation

Gareth McCaughan gmccaughan at synaptics-uk.com
Thu Jun 2 13:51:54 CEST 2005


> ?!ng: Well, i should refine that a bit to say that the Lisp macro system
> is a little more specific.  Whereas AST transformations in Python
> are open-ended (you could generate any result you want), the key
> interesting property of Lisp macros is that they are constrained
> to be "safe", in the sense that the bindings of variable names are
> always preserved.

I'm not quite sure what ?!ng means by "the bindings of
variable names are always preserved", but I conjecture
that he is thinking of the "hygienic macros" in Scheme
rather than the macros in Common Lisp which permit
arbitrary code transformations.

-- 
g



More information about the Python-Dev mailing list