473,473 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
2 1326
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christian Tismer | last post by:
Martin v. Löwis wrote: > "Mark Hahn" <mark@hahnca.com> writes: > > >>I don't understand how this could happen with pickle. Isn't it supposed to >>stop when it runs into an object it has...
75
by: Xah Lee | last post by:
http://python.org/doc/2.4.1/lib/module-re.html http://python.org/doc/2.4.1/lib/node114.html --------- QUOTE The module defines several functions, constants, and an exception. Some of the...
3
by: Patrick | last post by:
Hi I am currently learning JS and have heard a lot of good about that book even if it's a reference and better suited for intermediate to experienced users. My local bookstore has both the 3rd...
45
by: Steven T. Hatton | last post by:
This is a purely *hypothetical* question. That means, it's /pretend/, CP. ;-) If you were forced at gunpoint to put all your code in classes, rather than in namespace scope (obviously classes...
2
by: Gil Sudai | last post by:
We have a JavaScript SDK with lots of classes and functions. We would like to generate automatic HTML documentation from it to our users. We look for a free tool, something like Doxygen, that knows...
8
by: Will Pittenger | last post by:
I have a Windows program C# .NET solution where when I update its XML documentation, some tags are not recognized and turned into the corresponding HTML. Those tags include <c>, <code>, <para>,...
6
by: Adie | last post by:
Hi, is there a C# equivalent to Bjarne Stroustrop's "Programming in C++" yet? If so, what is it?
97
by: Cameron Laird | last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh "Most of the discussion of immutables here seems to be caused by newcomers wanting to copy an idiom from another language which...
4
by: Chris F Clark | last post by:
Please excuse the length of this post, I am unfortunately long-winded, and don't know how to make my postings more brief. I have a C++ class library (and application generator, called Yacc++(r)...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.