Python name lookups / Interning strings

Dave zhu_dave at yahoo.com
Tue Oct 11 18:36:05 EDT 2005


--- jepler at unpythonic.net 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 || ep->me_key == key)
>                 return ep;
> return a result without comparing the contents of
> the strings.

What exactly does it mean to "intern" a string?

Thanks!


		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/



More information about the Python-list mailing list