Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0b3a00

Browse files
committed
heappop(): Use "while True" instead of "while 1".
1 parent d2cf1ab commit a0b3a00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/heapq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def heappop(heap):
142142
returnitem = heap[0]
143143
item = heap.pop()
144144
pos = 0
145-
while 1:
145+
while True:
146146
child2pos = (pos + 1) * 2
147147
child1pos = child2pos - 1
148148
if child2pos < endpos:

0 commit comments

Comments
 (0)