[Python-Dev] Re: Alternative implementation of string interning
Barry A. Warsaw
barry@zope.com
Wed, 3 Jul 2002 09:34:12 -0400
>>>>> "KY" == Ka-Ping Yee <ping@zesty.ca> writes:
KY> It appears that what you are proposing is what interned string
KY> comparison already does (since == checks for pointer equality
KY> first). So, the only observable effect of the change would be
KY> to break all code that tests for type(s) == str.
Shouldn't those already be written as isinstance(s, str)? Maybe with
StringType for str?
Even so, I'm not much in favor of adding more string types to the
language. I think we should be /collapsing/ string types not
proliferating them (i.e. removing the distinction between str and
unicode -- Jython seems to get by just fine that way).
-Barry