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 returned; its "interning state" is set to "interned" (either mortally or immortally, depending on the exact interning request).
More colloquially, it means to find a unique representative of the set of all equal-valued strings (e.g. one unique representative for all strings equalling "close"). If a and b are variables referring to interned strings, 'a==b' implies 'a is b' (whereas usually only the reverse is true). HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list