Lisp-like macros in Python?

Duane Rettig duane at franz.com
Tue May 1 16:20:32 EDT 2007


sturlamolden <sturlamolden at yahoo.no> writes:

> Hello
>
> The Lisp crowd always brags about their magical macros. I was
> wondering if it is possible to emulate some of the functionality in
> Python using a function decorator that evals Python code in the stack
> frame of the caller. The macro would then return a Python expression
> as a string. Granted, I know more Python than Lisp, so it may not work
> exactly as you expect.
>
> Any comments and improvements are appreciated.
>
> Regards,
> Sturla Molden

I don't know python, but check out

http://www.cl-user.net/asp/libs/clpython

-- 
Duane Rettig    duane at franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   



More information about the Python-list mailing list