[issue35636] remove redundant check in unicode_hash(PyObject *self)

Stefan Behnel report at bugs.python.org
Thu Jan 3 02:02:11 EST 2019


Stefan Behnel <stefan_ml at behnel.de> added the comment:

> why bytes and str generates the same hash value for ASCII sequence

Probably mostly for historical Py2 reasons. These days, both are somewhat unlikely to appear in the same dict. But still, I'd advise against changing the hash function without a very good reason. You never know how much code relies on it in one way or another.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35636>
_______________________________________


More information about the Python-bugs-list mailing list