summaryrefslogtreecommitdiffstats
path: root/Doc
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)
commit607cc361bb489bb5d860ef162bcf91a7c7795d42 (patch)
treeaf8b6616c1553d32ea24a893aa3716fd9b477844 /Doc
parent21c69b1043d510d29928c15cb9e3e2c1c23f1d0a (diff)
downloadcpython-607cc361bb489bb5d860ef162bcf91a7c7795d42.zip
cpython-607cc361bb489bb5d860ef162bcf91a7c7795d42.tar.gz
cpython-607cc361bb489bb5d860ef162bcf91a7c7795d42.tar.bz2
Fix bug in heapq priority queue example.
Diffstat (limited to 'Doc')
-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 86be3bd..c995802 100644
--- a/Doc/library/heapq.rst
+++ b/Doc/library/heapq.rst
@@ -205,8 +205,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):