[Python-Dev] Pickler/Unpickler API clarification
greg.ewing at canterbury.ac.nz
Sat Mar 7 12:40:46 CET 2009
Michael Haggerty wrote:
> A similar effect could *almost* be obtained without accessing the memos
> by saving the pickled primer itself in the database. The unpickler
> would be primed by using it to load the primer before loading the record
> of interest. But AFAIK there is no way to prime new picklers, because
> there is no guarantee that pickling the same primer twice will result in
> the same id->object mapping in the pickler's memo.
Would it help if, when creating a pickler or unpickler,
you could specify another pickler or unpickler whose
memo is used to initialise the memo of the new one?
Then you could keep the pickler that you used to pickle
the primer and "fork" new picklers off it, and similarly
with the unpicklers.
More information about the Python-Dev