[Python-checkins] cpython (3.2): Fix bug in heapq priority queue example.
georg.brandl
python-checkins at python.org
Sun Sep 18 07:39:11 CEST 2011
http://hg.python.org/cpython/rev/5deecc04b7a2
changeset: 72396:5deecc04b7a2
branch: 3.2
parent: 72393:e6407b2d2f0c
user: Georg Brandl <georg at python.org>
date: Sun Sep 18 07:40:05 2011 +0200
summary:
Fix bug in heapq priority queue example.
files:
Doc/library/heapq.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst
--- a/Doc/library/heapq.rst
+++ b/Doc/library/heapq.rst
@@ -191,8 +191,8 @@
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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list