variables of the class are not available as default values?
bruno.42.desthuilliers at websiteburo.invalid
Fri Aug 28 10:51:43 CEST 2009
Chris Rebert a écrit :
> Default values are only evaluated once, when the class is defined,
The function objects (defined in a class statement body...) are created
before the class object itself.
> thus "self" is not defined at that point since the class is still
> being defined when the method definition is executed and thus there
> can be no instances yet anyway.
More information about the Python-list