Definitive documentation on newstyle classes? (WAS: Pickling and inheritance are making me hurt)

Michele Simionato michele.simionato at gmail.com
Wed Feb 9 00:11:55 EST 2005


> It would be good to have a clear exposition of the pros and cons of
> __new__ usage.

It is there mostly because __init__ would not work on immutable types.
OTOH, you probably do not want to use __new__ on mutable types
(once I was caught by this trap, google for "overriding list.__new__"
if you are interested).
 
   Michele Simionato




More information about the Python-list mailing list