Trent Nelson a écrit : (snip (rather convoluted) decorator example) > When Python first parses your code, every time it runs into '@A', it > calls A() in order to get the required decorator function.
It's not happening at parsing time, but when the (decorated) def statement is executed - that is, *usually* (but not necessarily), when the module/script is loaded in the interpreter (either as a the main program or thru import). -- http://mail.python.org/mailman/listinfo/python-list