Skip to content

Commit a4330c3

Browse files
committed
Update heapq from Python 3.11
1 parent a6a9212 commit a4330c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/heapq.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
item = heappop(heap) # pops the smallest item from the heap
1313
item = heap[0] # smallest item on the heap without popping it
1414
heapify(x) # transforms list into a heap, in-place, in linear time
15+
item = heappushpop(heap, item) # pushes a new item and then returns
16+
# the smallest item; the heap size is unchanged
1517
item = heapreplace(heap, item) # pops and returns smallest item, and adds
1618
# new item; the heap size is unchanged
1719

0 commit comments

Comments
 (0)