[issue1549] Regression with __hash__ definition and rich comparison operators

Thomas Herve report at bugs.python.org
Tue Dec 4 12:02:52 CET 2007


Thomas Herve added the comment:

I gave it a try. The following patch corrects 2 problems:
 * classes with only __lt__ and __gt__ defined are hashable
 * classes defining __eq__ get a meaningful exception.

I've restricted the hash_name_op to the bare minimum, but no tests
failed, so I supposed it was enough :).

Please review.

Added file: http://bugs.python.org/file8871/1549_1.diff

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1549>
__________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 1549_1.diff
Url: http://mail.python.org/pipermail/python-bugs-list/attachments/20071204/91571687/attachment.txt 


More information about the Python-bugs-list mailing list