[Python-Dev] PEP 218 (sets); moving set.py to Lib

Guido van Rossum guido@python.org
Mon, 19 Aug 2002 20:33:56 -0400

> When I optimized a useless ~ out of the dict code for 2.2, it became much
> more likely that the traversal order for an int-keyed dict would match
> numeric order.  I have evidence that this has fooled newbies into believing
> that dicts are ordered maps!  If it wouldn't cost an extra cycle, I'd be
> tempted to slop the ~ back in again <0.9 wink>.

Maybe add a ~ to the int hash code?  That means it's not on the
critical path for dicts with string keys.

--Guido van Rossum (home page: http://www.python.org/~guido/)