[Zope-dev] Pickling class dictionaries?

Stefan Franke sfranke@cdc-group.com
Fri, 26 Mar 1999 23:13:14 +0100


How is the dictionary of a Products class object treated by
BoboPOS? 
I'm thinking of using an existing class, which keeps an 
inventory of its instances (I'm sure there was a pattern name 
for this...) as a basis for a Product, and wonder if it is
feasible.

Python's std lib documentation is a little ambigous about
this: First, it says

"Note that when class instances are pickled, their class's 
code and data are not pickled along with them. Only the 
instance data are pickled."

Later then:

"The following types can be pickled: 
[...]
 - classes that are defined at the top level in a module "

Can anyone light things up?
Stefan