"Gabriel Genellina" writes:
> En Mon, 25 May 2009 11:07:13 -0300, Jaime Fernandez del Rio
> escribió:
>> And since I'm asking, could something similar, i.e. defining a new
>> function and get a handle to it, be achieved with eval?
>
> No, because def is a statement, and eval only accepts an expr
En Mon, 25 May 2009 11:07:13 -0300, Jaime Fernandez del Rio
escribió:
These weekend I've been tearing down to pieces Michele Simionato's
decorator module, that builds signature preserving decorators. At the
heart of it all there is a dynamically generated function, which works
something similar
These weekend I've been tearing down to pieces Michele Simionato's
decorator module, that builds signature preserving decorators. At the
heart of it all there is a dynamically generated function, which works
something similar to this...
...
src = """def function(a,b,c) :\nreturn _caller_(a