Ethan Furman <[email protected]> added the comment:
I know I'm late to the party, but if
bool(NotImplemented)
returned `NotImplemented` wouldn't that solve the problem?
def __ge__(self, other):
return not self.__lt__(other)
then
if __lt__ returns then __gt__ returns
NotImplemented NotImplemented
True False
False True
Correct code (which checks for NotImplemented) would still work, and buggy code
(which just returns the bool() of NotImplemented), would then be correct.
----------
nosy: +ethan.furman
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35712>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com