summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-09-18 07:40:05 +0200
committerGeorg Brandl <georg@python.org>2011-09-18 07:40:05 +0200
commitb573ef1055db03aabc60cd77a3b770d33a198d4d (patch)
treecf4dfdb9001bb00d7e706ec49e327fa8a4e76be0
parent7d670ca34bd935e59cefe8634182d9443bee3704 (diff)
downloadcpython-b573ef1055db03aabc60cd77a3b770d33a198d4d.tar.gz
Fix bug in heapq priority queue example.
-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 c8634ba291..2ab632fb8e 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):