nested functions

Fredrik Lundh fredrik at pythonware.com
Thu Jun 15 04:09:52 EDT 2006


George Sakkis wrote:

> It shouldn't come as a surprise if it turns out to be slower, since the
> nested function is redefined every time the outer is called.

except that it isn't, really: all that happens is that a new function object is created from
prebuilt parts, and assigned to a local variable.  it's not slower than, say, a method call.

</F> 






More information about the Python-list mailing list