Message363956
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. |
|
Date |
User |
Action |
Args |
2020-03-11 18:53:44 | ethan.furman | set | recipients:
+ ethan.furman, gvanrossum, terry.reedy, steven.daprano, serhiy.storchaka, josh.r, veky, xtreak |
2020-03-11 18:53:44 | ethan.furman | set | messageid: <1583952824.68.0.232094368062.issue35712@roundup.psfhosted.org> |
2020-03-11 18:53:44 | ethan.furman | link | issue35712 messages |
2020-03-11 18:53:44 | ethan.furman | create | |
|