Message397245
I stumbled across this independently in bpo-44596, but missed this existing report due to the specific word I was looking for (encapsulation).
In addition to the comparison operand coercion, there's now another access option through the `__ror__` method.
The bug in both cases arises from delegating a method/function implementation to the underlying mapping type in a way that invokes the full operand coercion dance. (PyObject_RichCompare in one case, PyNumber_Or in the other)
Delegating these operations to the underlying mapping does make sense, but it needs to be a lower level delegation that bypasses the operand coercion dance, so the other operand only ever sees the proxy object, not the underlying mapping. |
|
Date |
User |
Action |
Args |
2021-07-10 10:27:23 | ncoghlan | set | recipients:
+ ncoghlan, rhettinger, serhiy.storchaka |
2021-07-10 10:27:23 | ncoghlan | set | messageid: <1625912843.83.0.51279172293.issue43838@roundup.psfhosted.org> |
2021-07-10 10:27:23 | ncoghlan | link | issue43838 messages |
2021-07-10 10:27:23 | ncoghlan | create | |
|