Re: exec statement with/without prior compile...

2009-05-26 Thread Arnaud Delobelle
"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

Re: exec statement with/without prior compile...

2009-05-26 Thread Gabriel Genellina
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

exec statement with/without prior compile...

2009-05-25 Thread Jaime Fernandez del Rio
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