Message21827
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.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:24:35 | admin | link | issue998998 messages |
2007-08-23 14:24:35 | admin | create | |
|