diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-08-02 19:45:37 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-08-02 19:45:37 (GMT) |
commit | a0b3a00bc5f55cfbdc3d9b7925ee8a28fa2bdc55 (patch) | |
tree | c4a13b1fc417cd3ec49730f5358d77fe9ee1644e /Lib/heapq.py | |
parent | d2cf1ab0e27b3d794b28170fe745c84723209b86 (diff) | |
download | cpython-a0b3a00bc5f55cfbdc3d9b7925ee8a28fa2bdc55.zip cpython-a0b3a00bc5f55cfbdc3d9b7925ee8a28fa2bdc55.tar.gz cpython-a0b3a00bc5f55cfbdc3d9b7925ee8a28fa2bdc55.tar.bz2 |
heappop(): Use "while True" instead of "while 1".
Diffstat (limited to 'Lib/heapq.py')
-rw-r--r-- | Lib/heapq.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ def heappop(heap): returnitem = heap[0] item = heap.pop() pos = 0 - while 1: + while True: child2pos = (pos + 1) * 2 child1pos = child2pos - 1 if child2pos < endpos: |