[issue7502] All DocTestCase instances compare and hash equal to each other

Antoine Pitrou report at bugs.python.org
Sun Dec 18 17:18:35 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

The definition of __eq__ is wrong: it shouldn't compare the hashes since the hash() function isn't injective. For example, 0 and "" have equal hashes, yet they are unequal.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7502>
_______________________________________


More information about the Python-bugs-list mailing list