> > 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?

Right.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to