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

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sat Feb 5 20:35:55 EST 2005


Daniel Bickett a écrit :
> I was reading the "Pickling and inheritance are making me hurt"
> thread, and the latest suggestion (as of this posting) was to do with
> the __setstate__ and __getstate__ methods. They caught my attention
> because I hadn't encountered them before, and it reminded me that in
> the past I've never been able to very good, definitive documentation
> on newstyle classes. 

Well, the fact is that __[get|set]state__() have nothing to do with new 
style classes, but with the Pickle protocol:
http://www.python.org/doc/2.3.4/lib/pickle-inst.html

(snip)
Bruno



More information about the Python-list mailing list