commit | a0b3a00bc5f55cfbdc3d9b7925ee8a28fa2bdc55 | [log] [tgz] |
---|---|---|
author | Tim Peters <tim.peters@gmail.com> | Fri Aug 02 19:45:37 2002 +0000 |
committer | Tim Peters <tim.peters@gmail.com> | Fri Aug 02 19:45:37 2002 +0000 |
tree | c4a13b1fc417cd3ec49730f5358d77fe9ee1644e | |
parent | d2cf1ab0e27b3d794b28170fe745c84723209b86 [diff] |
heappop(): Use "while True" instead of "while 1".
diff --git a/Lib/heapq.py b/Lib/heapq.py index 6264700..524f65c 100644 --- a/Lib/heapq.py +++ b/Lib/heapq.py
@@ -142,7 +142,7 @@ returnitem = heap[0] item = heap.pop() pos = 0 - while 1: + while True: child2pos = (pos + 1) * 2 child1pos = child2pos - 1 if child2pos < endpos: