title: Check if heapq contains value
body: <p>I am using the heapq object to store objects of class which I implemented.</p>
  
  <pre><code>import heapq
  
  heap = []
  element1 = Element('A', 1)
  element2 = Element('B', 2)
  element3 = Element('C', 3)
  heapq.heappush(heap, element1)
  heapq.heappush(heap, element2)
  heapq.heappush(heap, element3)
  </code></pre>
  
  <p>In my class Element I overwrite method <code>__cmp__</code> to ensure that value is the priority</p>
  
  <pre><code>def __cmp__(self, other):
          return cmp(self.value, other.value)
  </code></pre>
  
  <p>Now I want to write a function, which checks if heap contains element, such that
  if I want to check if <code>element = Element('A', 1)</code> is in the heap, the answer will be <code>True</code>, if I will check <code>element = Element('A',100)</code> the answer will be also <code>True</code>, but if I want to check <code>element = Element('D',1)</code> the answer will be <code>False</code>.
  How can I implement such method? Is it possible to check elements of <code>heapq</code> without calling <code>pop()</code> method?</p>