Paul Rubin wrote: > [EMAIL PROTECTED] writes: >> assert magic_function(3+4)=="3+4" >> assert magic_function([i for i in range(10)])=="i for i in range(10)]" >> >> It is not trivial at all and might require some bytecode hacking that i >> am unable to do myself BUT you are the experts ;-) > > Guhhh... you'd want to use the traceback system and reach back into > the source code to get and parse the statement that called the magic > function, sort of like a debugger does.
That's one way > I don't think messing with > the bytecode would help. Well, the following package http://packages.debian.org/stable/python/decompyle might permit something like that. -- http://mail.python.org/mailman/listinfo/python-list