def push ( self , el ) : count = next ( self . counter ) heapq . heappush ( self . _queue , ( el , count ) )
update element on the heap heapq python
Put a new element in the queue .
def push(self, el):
        """ Put a new element in the queue. """
        count = next(self.counter)
        heapq.heappush(self._queue, (el, count))