Message375621
https://docs.python.org/3/reference/datamodel.html#object.__ror__ has a note saying:
"If the right operand's type is a subclass of the left operand's type and that subclass provides the reflected method for the operation, this method will be called before the left operand's non-reflected method." The slightly unclear part (at least to me) is the "provides the reflected method."
What this actually means according to https://bugs.python.org/issue30140 is that the subclass **implements** the `__r*__` method, not just that the method is reachable on the subclass via getattr(). That wasn't clear to me when I initially read this. |
|
| Date |
User |
Action |
Args |
| 2020-08-18 17:56:34 | brett.cannon | set | recipients:
+ brett.cannon, docs@python |
| 2020-08-18 17:56:34 | brett.cannon | set | messageid: <[email protected]> |
| 2020-08-18 17:56:34 | brett.cannon | link | issue41584 messages |
| 2020-08-18 17:56:34 | brett.cannon | create | |
|