modifying __new__ of list subclass
Ken Schutte
kschutte at csail.mit.edu
Tue Aug 15 09:40:58 EDT 2006
Steven Bethard wrote:
>
> The __new__ method is for immutable types. So things like str and int
> do their initialization in __new__. But for regular mutable types, you
> should do your initialization in __init__::
>
I see... So, is there a use for __new__ in mutable types? From my
list-derirved class, it was obviously being called, but it's return
value is totally ignored?
Thanks for the reply.
More information about the Python-list
mailing list