Message232009
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. |
|
Date |
User |
Action |
Args |
2014-12-02 16:02:46 | r.david.murray | set | recipients:
+ r.david.murray, Brian.Mearns |
2014-12-02 16:02:46 | r.david.murray | set | messageid: <1417536166.48.0.0218451535767.issue22978@psf.upfronthosting.co.za> |
2014-12-02 16:02:46 | r.david.murray | link | issue22978 messages |
2014-12-02 16:02:46 | r.david.murray | create | |
|