AssertionError in pickle's memoize function

From: Michael Hohn (hohn_at_hooknose.lbl.gov)
Date: 10/29/04


Date: Fri, 29 Oct 2004 17:40:00 GMT

Hi,

under python 2.2, the pickle/unpickle sequence incorrectly restores
a larger data structure I have.

Under Python 2.3, these structures now give an explicit exception from
Pickle.memoize():
    assert id(obj) not in self.memo

I'm shrinking the offending data structure down to find the problem
and provide an easily reproducible example,
but maybe someone on the list could tell me under what general
conditions this assertion is expected to fail.

Thanks,
    Michael



Relevant Pages

  • Re: class methods vs. functions
    ... > def modulus: ... methods that work with that data structure. ... By incorporating modulus ... Python does place a premium on rapid prototyping and in consequence ...
    (comp.lang.python)
  • Re: remove duplicates from list *preserving order*
    ... - Put the element in the data structure only if not already there and tell me, ... I don't see any easy way to do this in python, ... > def filterdups: ... > I'm leaning towards the second or third implementation. ...
    (comp.lang.python)
  • Re: An ordered dictionary for the Python library?
    ... Do other Python programmers feel this lack? ... It is worth having an ordered data structure of some kind. ... An API that is identical to a dict, ...
    (comp.lang.python)
  • Re: tuple.index()
    ... One of the places where Cobol, Ada and Python are superior to C and Perl ... The point is that an index method makes sense on ANY data structure that ... mathematical reason why it shouldn't be. ...
    (comp.lang.python)
  • An ordered dictionary for the Python library?
    ... I feel that Python lacks one useful data structure: ... I know that in Python ... pure Python ...
    (comp.lang.python)