This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author codemiller
Recipients Jim.Jewett, catalin.iacob, codemiller, eric.araujo, francescor, javawizard, lregebro, ncoghlan, python-dev, rhettinger
Date 2013-07-09.02:37:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373337431.24.0.70157547997.issue10042@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-07-09 02:37:11codemillersetrecipients: + codemiller, rhettinger, ncoghlan, eric.araujo, lregebro, francescor, catalin.iacob, python-dev, javawizard, Jim.Jewett
2013-07-09 02:37:11codemillersetmessageid: <1373337431.24.0.70157547997.issue10042@psf.upfronthosting.co.za>
2013-07-09 02:37:11codemillerlinkissue10042 messages
2013-07-09 02:37:10codemillercreate