commit | 3422c99de1d1c001ebc1416e3efc1b10452347b5 | [log] [tgz] |
---|---|---|
author | Jeremy Hylton <jeremy@alum.mit.edu> | Fri Jan 24 19:29:52 2003 +0000 |
committer | Jeremy Hylton <jeremy@alum.mit.edu> | Fri Jan 24 19:29:52 2003 +0000 |
tree | 1a2ec5eb8d8719c98528b467ecb88032167e17f8 | |
parent | 234d9a9eb390fc0975ca6fe8d010c45642bcdfed [diff] |
Raise PicklingError when __reduce__() fails, and add memoize() helper function to update the memo. The first element of the tuple returned by __reduce__() must be a callable. If it isn't the Unpickler will raise an error. Catch this error in the pickler and raise the error there. The memoize() helper also has a comment explaining how the memo works. So methods can't use memoize() because the write funny codes.