[Python-Dev] The memo of pickle

Martin v. Loewis martin@v.loewis.de
08 Aug 2002 08:48:20 +0200


Guido van Rossum <guido@python.org> writes:

> > But I think the idea of keeping the object references in a list is
> > well worth trying first. 4 bytes per object instead of 36 sounds like a
> > good improvement to me!
> 
> So maybe we need to create an identitydict...

In that case, the backwards compatibility problems are more serious.

Of course, we could chose the type of dictionary based on whether this
is a Pickler subclass or not (with some protocol to let the subclass
make us aware that we should use the identitydict, anyway).

This is, of course, a bigger change than I originally had in mind.

Regards,
Martin