No macros in Python
Courageous
jkraska at san.rr.com
Mon Dec 16 00:04:45 EST 2002
>Bad quoting: I believe I and not Courageous wrote the above.
That's really (mostly) my fault. I often trim all attribution when
I post. I do this largely to avoid the type of error you just noted.
>I read his response, which confirms what you suggest, but I still have not
>grasped the *value* of doing this.
Well, one value is the ability to design domain-specific dialects of
the language. Whether or not _you_ value this is, of course, a separate
question.
I ran into a situation the other day where I would have liked a generator
to grab the state of the parent frame and not the frame I am in. Don't
know any way to do this currently, but could do it if I could lexically expand
a macro in the parent frame's context. Given a broader set of choices, I
wouldn't prefer that one, though.
C//
More information about the Python-list
mailing list