Jun-09-2020, 09:22 PM
(This post was last modified: Jun-09-2020, 09:23 PM by Gribouillis.)
There is no point in wrapping
o.__contains__
in lambda x: x in o
, apart from having a less efficient code. Another reason for the existence of __contains__
in python is to define a custom in
operator for a user defined class.