[Python-Dev] Re: Alternative implementation of string interning

Jeremy Hylton jeremy@zope.com
Wed, 3 Jul 2002 14:17:12 -0400


>>>>> "OT" == Oren Tirosh <oren-py-d@hishome.net> writes:

  OT> This thought experiment is part of a strange fantasy I have that
  OT> Python might one day use only interned strings to represent
  OT> names. There are relatively few places where a string may be
  OT> converted to a name (getattr, hasattr, etc) and these could be
  OT> interned at the interface if interned strings are not
  OT> immortal. I expect that nothing will ever come out of this, but
  OT> it's fun to think about it anyway...

two responses:

What do you mean by "represent names"?  Code objects already use
interned strings for names.  Did you have something else in mind?

You might have mentioned this thought experiment / strange fantasy at
the outset of the thread <0.2 wink>.  There was a lot of email
thrashing on this subject, but none of it apeears to have been
necessary.

Jeremy