Katie Miller added the comment:

Attached is a new patch, which includes Nick's logic from msg140493, some of 
the code readability changes Jim suggested in msg151989 (but not the 
behavioural changes), and associated tests. On Nick's advice, I have also 
replaced the dunder equals calls with the standard comparators (==/!=), given 
not all classes will necessarily have both NE and EQ, and made the comparison 
the last action in each method, for consistency.

Test cases have been added to check a TypeError is raised, rather than True 
being returned, when GE/LE is called on two objects that are equal but have a 
comparator that returns NotImplemented.

----------
Added file: 
http://bugs.python.org/file30871/10042_new_total_ordering_with_tests.patch

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

Reply via email to