summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-09-18 05:40:05 (GMT)
committerGeorg Brandl <georg@python.org>2011-09-18 05:40:05 (GMT)
commit1d678f841363d8636cb02510d31e4e4fb9d8815f (patch)
treead47e4b23e0e92292f8dfa7a69f1a63f3d93ccff /Doc/library
parent73dd7c71f69b234fb1f3944efa1f08969b3ae3cc (diff)
downloadcpython-1d678f841363d8636cb02510d31e4e4fb9d8815f.zip
cpython-1d678f841363d8636cb02510d31e4e4fb9d8815f.tar.gz
cpython-1d678f841363d8636cb02510d31e4e4fb9d8815f.tar.bz2
Fix bug in heapq priority queue example.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/heapq.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst
index c8634ba..2ab632f 100644
--- a/Doc/library/heapq.rst
+++ b/Doc/library/heapq.rst
@@ -191,8 +191,8 @@ entry as invalid and optionally add a new entry with the revised priority::
def get_top_priority():
while True:
priority, count, task = heappop(pq)
- del task_finder[task]
if count is not INVALID:
+ del task_finder[task]
return task
def delete_task(task):