Message21827
| 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:35 | admin | link | issue998998 messages |
| 2007年08月23日 14:24:35 | admin | create |
|