On Thu, 28 Jul 2011 11:52:25 +0200, Pedro Larroy wrote:

> pickling
> 
> Just crossposting this from stackoverflow:
> 
> http://stackoverflow.com/questions/6857006/
> 
> Any hints?

AFAIK, it's because the Pickler object keeps a reference to each object so
that pointer-sharing works; if you write the same object multiple times,
you get multiple references to a single object, not multiple objects.

This means that the dictionaries aren't deleted while the Pickler object
lives.

It would seem that this issue could be avoided if pickle used weak
references, but there may be issues which I have overlooked.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to