By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,376 Members | 1,566 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,376 IT Pros & Developers. It's quick & easy.

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

P: n/a
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. Googling for it gives little python tutorials on
various sites, and even searching this newsgroup returns very specific
questions, as a rule.

Alas, the question: Does there exist a page that enumerates all of the
features of the newstyle classes, and explains what they all do? If
so, can anyone provide me with such a link?

Thanks :-)
--
Daniel Bickett
dbickett at gmail.com
http://heureusement.org/
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Jul 18 '05 #2

P: n/a
Bruno Desthuilliers wrote:
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


Thank you for pointing that out, but all the same ;)

--
Daniel Bickett
dbickett at gmail.com
http://heureusement.org/
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.