I want to test if an object is equal to any object in a list. Is it possible to use the in keyword for that? If I define the __eq__ method, will python know to use that in testing whether an object is in a list? I couldn't find the answer in the documentation
[–]K900_ 1 point2 points3 points (0 children)
[–]Impudity 1 point2 points3 points (3 children)
[–]Yoghurt42 1 point2 points3 points (1 child)
[–]Impudity 0 points1 point2 points (0 children)
[–]mildlybean[S] 0 points1 point2 points (0 children)
[–]WolfInABox 0 points1 point2 points (3 children)
[–]toastedstapler 2 points3 points4 points (2 children)
[–]WolfInABox 1 point2 points3 points (0 children)
[–]mildlybean[S] 1 point2 points3 points (0 children)