On Wed, Oct 21, 2009 at 12:31 PM, Anand Chitipothu <[email protected]> wrote:
> ``Intern'' the given string. This enters the string in the (global)
> table of interned strings whose purpose is to speed up dictionary lookups.
> Return the string itself or the previously interned string object with the
> same value.
>
Thanks, I didn't know of that. It could be useful sometime. Anyways,
for the current discussion intern-ing is irrelevant.
>>> id('superman')
30792544
>>> id('superman')
30792544
>>> id('superman')
30792544
>>> id('superman')
30792544
>>> id('superman')
30792544
>>> id('super man')
31955768
>>> id('super man')
31955488
>>> id('super man')
31956768
>>> id('super man')
31955768
>>> id('super man')
31955488
Also, http://mail.python.org/pipermail/tutor/2009-July/070157.html
Roshan Mathews
_______________________________________________
BangPypers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/bangpypers