I give up... was: A = X > Y ? X : Y
Michal Wallace
sabren at manifestation.com
Wed Feb 16 22:43:56 EST 2000
Fredrik Lundh wrote in message <4PEq4.89$mYj.181656576 at newsa.telia.net>...
>import sys
>
>def magic_eval(s):
> try:
> raise None
> except:
> frame = sys.exc_traceback.tb_frame.f_back
> return eval(s, frame.f_globals, frame.f_locals)
Wow. it *is* magic. Thanks! (Andrew, too)
>> Wouldn't that be useful in general for
>> experimenting with language enhancements,
>> even if the code were a little hairy?
>
>sure. if you know what you're doing ;-)
Why not to find out what I'm doing? :)
I may just do something with this in the near future..
-Michal
More information about the Python-list
mailing list