[Zope] Zope-specifics of cPickle

Dieter Maurer dieter@handshake.de
Wed, 21 Nov 2001 23:39:37 +0100


Stephan Herschel writes:
 > In Python it's possible to use the cPickle module to dump objects
 > (instanciated classes). This is not possible in zope's version of
 > cPickle. What's the reason for this difference?
It is.

The restriction is: the class must be defined at top level of
a Python module.

Zope's cPickle prevents pickling of wrapped objects, in addition.
This is good, as wrappers are runtime objects which should not
be pickled.



Dieter