Re: Python name lookups / Interning strings

2005-10-11 Thread Dave
--- [EMAIL PROTECTED] wrote: lookdict_string is used for most lookups of the form obj.attr because they are never found to have non-string keys entered or searched. Furthermore, most of these string keys are interned, which I believe makes the check if (ep-me_key == NULL

Re: Python name lookups / Interning strings

2005-10-11 Thread Martin v. Löwis
Dave wrote: What exactly does it mean to intern a string? exactly it means to place lookup the string in the global interning dictionary. If an entry is found, then interning yields the string in the interning dictionary. If the string is not found, it is added to the interning dictionary, and

Re: Python name lookups / Interning strings

2005-10-11 Thread Terry Hancock
On Tuesday 11 October 2005 05:36 pm, Dave wrote: What exactly does it mean to intern a string? For very simple strings such as A and for strings used as identifiers (I think), Python creates a permanent object during byte-code compilation. Thereafter, any time that string value occurs in the