[Python-Dev] Alternative implementation of interning, take 2

Oren Tirosh oren-py-d@hishome.net
Sat, 13 Jul 2002 07:04:09 -0400


On Fri, Jul 12, 2002 at 10:23:00PM -0400, Tim Peters wrote:
> Note that there are (at least) two parts to Oren's agenda:
> 
> 1. Removing the possibility for indirect interning.
> 
> 2. Making interned strings mortal, via the usual refcount rules.

In fact, #1 is only "indirectly" on my agenda. My goal was making interned 
strings mortal and indirectly interned strings kept messing up the reference
counts so I ripped them out after I found out that they're not effective in
the core.

The current version of my patch supports both both mortal and immortal
interned strings for backward compatibility. Anything that is silently
interned by the Python core uses mortal interned strings.  Explicit calls 
from Python code or extensions get immortal strings because they might 
depend on this behavior.

	Oren