MCPcopy Create free account
hub / github.com/ActiveState/code / push

Method push

recipes/Python/440673_Safe_heap_queue_class/recipe-440673.py:22–24  ·  view source on GitHub ↗

Push the item onto the heap.

(self, item)

Source from the content-addressed store, hash-verified

20 heapq.heapify(self._lst)
21
22 def push(self, item):
23 '''Push the item onto the heap.'''
24 return heapq.heappush(self._lst, self._wrap(item))
25
26 def popmin(self):
27 '''Pop the smallest item off the heap'''

Callers 3

insertMethod · 0.95
recipe-437116.pyFile · 0.45
recipe-440637.pyFile · 0.45

Calls 1

_wrapMethod · 0.95

Tested by

no test coverage detected