Actually, `x in S` uses `==` if `S` is a list and `hash` if `S` is a set (falling back to `==` if the hashes are equal in case of hash collisions). But anyway, you have to have both. Having `a == b` but `hash(a) != hash(b)` is incorrect in Python, and can lead to strange behavior (see http://nbviewer.ipython.org/6046766, particularly example 3).