Stringify object reference?

Alex Martelli aleax at aleax.it
Fri Oct 11 17:33:48 EDT 2002


Jeff Epler wrote:
        ...
> The only sane solution would be through a dictionary, where you have
> some good way to clean out stale entries.  The way you do this will
> probably be specific to your application.

Yep -- module weakref has a WeakValueDictionary type that often
helps with this, though (if you NEVER want to keep an object alive
JUST because it's a value in the dictionary).


Alex




More information about the Python-list mailing list