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__.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/WWW2BIWHPFN5L5DOATLBS37OFW7GVTKQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to