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 r.david.murray
Recipients Brian.Mearns, r.david.murray
Date 2014-12-02.16:02:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417536166.48.0.0218451535767.issue22978@psf.upfronthosting.co.za>
In-reply-to
Content
This would break Python's consistency.  'not' of a value returns its boolean inverse, and the boolean value of NotImplemented is True, just like the boolean value of any object that does not have methods that set its boolean value is True.  Having anything that is True return True when not is applied would be even more perverse than NANs are :)

The correct implementation of your __ne__ method is to not define it.  Python will then do the 'not __eq__(other)' call itself.
History
Date User Action Args
2014-12-02 16:02:46r.david.murraysetrecipients: + r.david.murray, Brian.Mearns
2014-12-02 16:02:46r.david.murraysetmessageid: <1417536166.48.0.0218451535767.issue22978@psf.upfronthosting.co.za>
2014-12-02 16:02:46r.david.murraylinkissue22978 messages
2014-12-02 16:02:46r.david.murraycreate