This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients
Date 2004-07-27.20:55:41
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The attached script (picklecycle.py) gives me an
assertion error
in Pickler.memoize().  Maybe I'm just doing something dumb.
I have very little experience with pickle and even less
experience
pickling new-style class instances.  I'm just trying to
adapt an
existing messy object graph to allow it to be pickled.
 I realize the
two instances refer to each other, but I thought pickle was
supposed to gracefully handle cyclic object graphs.

I can worm around the problem a couple ways.  First,
getting
rid of new-style classes does the trick.  Also
modifying B.__reduce__
to not return self.__dict__ seems to do the trick.

Output (cycle.out) and a modified version of
Pickler.memoize
(memoize.py) will be attached momentarily.
History
Date User Action Args
2007-08-23 14:24:35adminlinkissue998998 messages
2007-08-23 14:24:35admincreate