[Python-ideas] set.add() return value
greg.ewing at canterbury.ac.nz
Tue Feb 17 21:41:18 CET 2009
Raymond Hettinger wrote:
> One result was that two successive accesses for the
> same key in a large table did *not* double the time.
What kind of keys, though? In my case the keys aren't
strings, they're tuples. Even after you've found the
right slot in the hash table, you still need to compare
> Remember, that every time there is
> dotted access, there is a hash table lookup.
For a string, which is probably interned. As far as
I'm aware, there is no notion of interning for tuples.
More information about the Python-ideas