[Python-Dev] pickle me, Elmo?

Guido van Rossum guido@python.org
Mon, 10 Feb 2003 14:02:59 -0500


> Or if one wants to pickle instances of classes generated on the fly using
> the 'type' constructor and/or metaclasses.  I'm looking forward to
> evaluating the pickle protocol 2 to see if it can make this possible.

Please get together with Jeremy, who's done almost exactly this for
Zope 3.  I'm not sure that protocol 2 will be of much help; Jeremy's
code depends on subclassing Pickler and Unpickler, limiting him to
pickling at Python speed (cPickle doesn't allow subclassing and even
if it did, it doesn't have the same internal structure as the classes
in pickle.py; most subclasses I've seen depend on that internal
structure).

--Guido van Rossum (home page: http://www.python.org/~guido/)