[issue38105] hash collision when hash(x) == -2 causes many calls to __eq__

Guido Imperiale report at bugs.python.org
Wed Sep 11 06:31:58 EDT 2019


Guido Imperiale <crusaderky at gmail.com> added the comment:

Forgot a counter-example:

{C(1, 0), C(2, 0)}
C((1, 0)).__hash__
C((2, 0)).__hash__
C((1, 0)).__eq__(C((2, 0)))
{C((1, 0)), C((2, 0))}

----------

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


More information about the Python-bugs-list mailing list