Can't get items out of a set?

castironpi at castironpi at
Sat Mar 8 21:27:18 CET 2008

> something something equivalence class.

> The intern() builtin uses this approach:
>    interned = {}
>    def intern(s):
>         if s in interned:
>             return interned[s]
>         interned[s] = s
>         return s

If you've seen it before, and have the old one, return the old one.
Do I have this straight?

More information about the Python-list mailing list