A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-July/026110.html below:

[Python-Dev] Alternative implementation of string interning

[Python-Dev] Alternative implementation of string interningOren Tirosh oren-py-d@hishome.net
Tue, 2 Jul 2002 20:55:07 +0300
On Tue, Jul 02, 2002 at 04:37:42PM +0200, Jack Jansen wrote:
> 
> On Tuesday, July 2, 2002, at 03:57 , Oren Tirosh wrote:
> >> Uhm... I'm confused: macimport stores a pointer to the object if it's
> >> interned (the object in question is one of the strings in sys.path). It
> >> didn't INCREF the object, and that wasn't needed up until now because
> >> interned objects can never go away. However, if they can go away I 
> >> would
> >> think that storing a pointer would definitely call for an INCREF...
> >
> > Are you saying that this code is not following reference counting rules
> > and got away with it only because interned strings are immortal?
> 
> I'm afraid so. Or, actually, "afraid so" sounds too apologetic:-): 
> interned
> strings were specifically defined to be immortal.

I know it says so in the doc, but I always tended to look at it as an 
implementation limitation rather than a feature...

	Oren




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