How to make a subclass of tuple hashable in Python?
<p>I have a class which is a subclass of <code>tuple</code>. I want to use instances of that class as elements of a <code>set</code>, but I get the error that it is an unhashable type. I guess this is because I've overridden the <code>__eq__</code> and <code>__ne__</code> methods. What should I do to restore my type's hashability? I'm using Python 3.2.</p>
