nested functions

François Pinard pinard at iro.umontreal.ca
Fri Feb 25 07:46:26 EST 2000


"Tim Peters" <tim_one at email.msn.com> écrit:

> [Alexander V. Voinov]
> > Please remind me, if there are any performance penalties in nesting
> > functions ...

> [...] a function object has to be allocated [...each time through...],
> a pointer to the global namespace needs to be installed, and current
> bindings for optional arguments (if any) need to be captured.

It looks more powerful than I imagined!  Isn't this one more step towards
lexical closures? :-)

Thanks for educating me, and sharing this fine information with us.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list