title: Issue using heapq in python for a priority list
body: <p>I can't understand why my below code raise an error.</p>
  
  <p>I'm trying to build a priority list based on heapq module of Python.
  The only difference with a basic example of the module is that want to use it with custom objects in it it, instead of simple (int,int) or (int,str) tuples.</p>
  
  <pre><code>import heapq
  
  class MyObject():
  
   def __init__(self,a=0,name='toto'):
  
       self.a = a
       self.name = name
  
  if __name__ == '__main__':
  
   priority_list = []
   heapq.heappush(priority_list,(1,MyObject()))
   heapq.heappush(priority_list,(1,MyObject()))
  </code></pre>
  
  <p>This is the error I have:</p>
  
  <pre><code>heapq.heappush(priority_list,(1,MyObject()))
  
  TypeError: '&lt;' not supported between instances of 'MyObject' and 'MyObject'
  </code></pre>
  
  <p>The error is not raised if I use a different key to insert in the heap, but isn't heapq supposed to deal with same keys?
  I don't understand very well this behaviour.</p>
  
  <p>Thanks a lot</p>