[Python-Dev] d.get_key(key) -> key?

Guido van Rossum guido@python.org
Wed, 05 Jun 2002 21:36:26 -0400


> Seems to me that if the implementation of interning were
> smart enough, it would be able to drop strings that were
> not referenced from anywhere else.
> 
> Maybe *that* would be a useful feature to add?

An occasional run through the 'interned' dict (in stringobject.c)
looking for strings with refcount 2 would do this.  Maybe something
for the gc module do handle as a service whenever it runs its
last-generation collection?

--Guido van Rossum (home page: http://www.python.org/~guido/)