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

Barry A. Warsaw barry@zope.com
Wed, 5 Jun 2002 23:35:55 -0400


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

    >> 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?

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

What about exposing _Py_ReleaseInternedStrings() to Python, say, from
the gc module?

-Barry