not pickling dicts?

Martin von Loewis loewis at informatik.hu-berlin.de
Tue Jan 4 15:14:31 EST 2000


moonseeker at my-deja.com writes:

> I'm trying to pickle an object with a dictionary in it, but it seems that the
> data in the dict isn't pickled (or unpickled).

That must be a different problem. The dictionary contents should get
pickled, unless __getstate__ is defined and returns an empty
dictionary, or some other user-defined mechanism applies (setstate,
getinitargs, etc).

> Another question:
> Can I have shelve to use cpickle to improve performance?

shelve will automatically use cpickle if available.

Regards,
Martin



More information about the Python-list mailing list