mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Update heapq from Python 3.11
This commit is contained in:
1 file changed
+2
Vendored
+2
@@ -12,6 +12,8 @@ heappush(heap, item) # pushes a new item on the heap
|
||||
item = heappop(heap) # pops the smallest item from the heap
|
||||
item = heap[0] # smallest item on the heap without popping it
|
||||
heapify(x) # transforms list into a heap, in-place, in linear time
|
||||
item = heappushpop(heap, item) # pushes a new item and then returns
|
||||
# the smallest item; the heap size is unchanged
|
||||
item = heapreplace(heap, item) # pops and returns smallest item, and adds
|
||||
# new item; the heap size is unchanged
|
||||
|
||||
|
||||
Reference in new issue
Block a user