Dave Angel a écrit :
(snip
Default arguments of class methods are evaluated during the definition of the class

<pedantic>
Default arguments of functions are eval'd during the execution of the def statement.

The fact that you use a def statement within a class statement's body is totally orthogonal - a def statement produces a function object, period.

It's only when resolved as a class attribute that a function "becomes" a method object (thanks to the descriptor protocol).
</pedantic>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to