initializing mutable class attributes
db3l at fitlinxx.com
Thu Sep 2 15:48:39 CEST 2004
"Dan Perl" <dperl at rogers.com> writes:
> That is exactly what I'm trying to do, and in the initial posting of the
> thread I was mentioning an initialization exactly like yours, but at the
> same time I was pointing out that an initialization like that works only for
> immutable attributes and not for mutable attributes, hence the need for the
> __init__. Or doing it in __new__ as I showed in the new code.
Oh (glancing around with an embarrassed look) - you mean the behavior
that's the topic of this thread (generally easily determined by
reading the subject line to which one is replying)...
More information about the Python-list