Stefan Behnel added the comment:

The problem is, even if the chance is excessively small, it's not zero. 
Meaning, someone's data set somewhere will break somehow. And with hash 
randomisation, it'll mean that the problem spotted in some life system will be 
entirely unreproducible without knowing the exact hash seed value that 
triggered it (i.e. not at all in a debug setup, definitely not in a test suite).

Unequal keys accidentally comparing equal in a dict is something that wouldn't 
necessarily crash loudly. It may just lead to very subtly incorrect results, 
e.g. one lost item in an intermediate step of a process, and half a cent up or 
down in the final result.

Don't get me wrong, I think this is a very interesting idea and worth 
exploring. But I'd be very reluctant to introduce it into the core language 
general purpose data types.

As for Python implementation dicts, the keys in there will normally be 
interned, so the lookup will not compare the strings but only their pointers. 
Nothing to win on that front, really.

----------
nosy: +scoder

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23712>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to