Equality of objects in Python
<p>I have a class MyClass, which contains two member variables foo and bar.</p>

<p>I have two instances of this class, each of which has identical values for foo and bar.</p>

<p>However, when I compare them for equality, Python returns False.</p>

<p>How can I ensure these objects are equal, without having to manually check the values of their attributes every time they are compared? For example, I would like to be able to use the "in" operator.</p>
