decorators question

Carsten Haese carsten at uniqsys.com
Mon Dec 4 19:36:47 EST 2006


On Mon, 2006-12-04 at 23:44 +0100, Fredrik Lundh wrote:
> Carsten Haese wrote:
> 
> > * The function body gets compiled into byte code (but not executed).
> 
> careful: when you get as far as executing the "def" statement, the 
> function body has already been compiled.  the byte code for the function 
> is stored as a module-level constant:

You are, as always, correct, but I deliberately hid this detail inside
the "roughly, modulo irrelevant implementation details" disclaimer in an
attempt of causing the OP the smallest possible amount of confusion.

-Carsten





More information about the Python-list mailing list