13 Nov
2019
13 Nov
'19
6:29 p.m.
On Tue, Nov 12, 2019, at 20:00, Samuel Muldoon wrote:
*Currently, the `in` operator (also known as `__contains__`) always uses the rightmost argument's implementation.*
minor bikeshed: I've always considered the "r" in these to mean "reverse", not "right". more serious issue: method pairs like this generally use the main version *first* and only use the reversed version if the main one returns NotImplemented (not, as your post goes on to say, raises NotImplementedError. if all candidates return NotImplemented, the operator raises TypeError). If this is to consider the left-hand operand the primary authority, it might be better to simply name the method __in__.