Decorators, Identity functions and execution...

Fredrik Lundh fredrik at pythonware.com
Sun Apr 9 13:06:57 EDT 2006


Carl Banks wrote:

> Having said that, this decorator will not affect calling overhead at
> all.  The decorator is applied when the module is loaded, not when the
> decorated function is called.

to be precise, the decorator is applied when the "def" statement is exe-
cuted (that is, when the decorated function object is created).

this may be load time, or, for nested functions, some other time.

</F>






More information about the Python-list mailing list