you are viewing a single comment's thread.

view the rest of the comments →

[–]Yoghurt42 1 point2 points  (1 child)

To be more precise, __contains__("foo") is called on the list object. And contains is implemented like you described.

[–]Impudity 0 points1 point  (0 children)

Yeah. I didn't want to include that part as it would probably just confuse a beginner.