A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071097.html below:

[Python-Dev] Interning string subtype instances

[Python-Dev] Interning string subtype instances [Python-Dev] Interning string subtype instancesGreg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 14 03:32:24 CET 2007
Martin v. Löwis wrote:
> Greg Ewing schrieb:
> 
 > > The string comparison method knows when both
> > strings are interned
> 
> No, it doesn't - see stringobject.c:string_richcompare.

Well, I'm surprised and confused.

It's certainly possible to tell very easily whether
a string is interned -- there's a PyString_CHECK_INTERNED
macro that tests a field in the string object header.
But, I can't find anywhere that it's used in the core,
apart from the interning code itself and the string
alloc/dealloc code.

Can anyone shed any light on this? It seems to me that
by not using this information, only half the benefit of
interning is being achieved.

--
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4