[Python-Dev] The memo of pickle
Martin v. Loewis
07 Aug 2002 08:35:08 +0200
Guido van Rossum <firstname.lastname@example.org> writes:
> Is it worth it?
If you believe that the problem is real, yes.
> Have you made a patch?
Not yet, no. With Mark's objection, it is more difficult than I
> What use case are you thinking of?
People repeatedly complain that pickle consumes too much memory. The
most recent instance was
Earlier reports are
> Sorry, what's an identity dict?
IdentityDictionary is the name of a Smalltalk class that uses identity
instead of equality when comparing keys:
In Python, it would allow arbitrary objects as keys, and allow equal
duplicates as different keys. For pickle, this would mean that we
could save both the creation of the id() object (since the object
itself is used as a key), and the creation of the tuple (since the
value is only the position).