Message347722
> Karthikeyan, I think there is a flaw in your example. The good __eq__ should return NotImplemented instead of False for other types. This wil allow the right operand's __eq__ to play.
Serhiy, my example was to try reproducing the original report where Django model tries to check if the other's type and returns False if the type is not a Django model. There could be cases where __eq__ implementation of a class could be just returning False instead of raising a NotImplemented error due to difference in type that affects comparison of ANY.
> Django first checks if the thing it's comparing to is another Django model, and returns False if not. So, <DjangoModel> == ANY is False, but ANY == <DjangoModel> is True. |
|
Date |
User |
Action |
Args |
2019-07-12 05:23:57 | xtreak | set | recipients:
+ xtreak, serhiy.storchaka, ElizabethU |
2019-07-12 05:23:57 | xtreak | set | messageid: <1562909037.66.0.649610656302.issue37555@roundup.psfhosted.org> |
2019-07-12 05:23:57 | xtreak | link | issue37555 messages |
2019-07-12 05:23:57 | xtreak | create | |
|