[Python-bugs-list] [ python-Bugs-452747 ] New-style class instances can't be pickled
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 05 Sep 2001 10:39:54 -0700
Bugs item #452747, was opened at 2001-08-18 17:45
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=452747&group_id=5470
Category: Type/class unification
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Allan Crooks (amc1)
Assigned to: Guido van Rossum (gvanrossum)
>Summary: New-style class instances can't be pickled
Initial Comment:
Any class which extends either the dictionary or list
types in Python 2.2a1 is both unpickable by both the
pickle module and cPickle, and is uncopyable by the
copy module.
Oh, and I'll use this opportunity to thank Guido and
everyone who's ever worked on Python for making a
programming language which is absolutely wonderful to
program in. :)
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-18 23:35
Message:
Logged In: YES
user_id=6380
Thanks <blush> :-)
Regarding your bug, it's more general than what you describe
even: any class derived from object except certain built-in
classes are unpicklable.
I have to think about this -- part of my brain says that
this is how it should be, and that you can register your
constructor with copy_reg to make your type picklable, and
another part of my brain says that it should be supported
one way or another.
Changed the subject to reflect the problem better.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=452747&group_id=5470