From 607cc361bb489bb5d860ef162bcf91a7c7795d42 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 18 Sep 2011 07:40:05 +0200 Subject: [PATCH] Fix bug in heapq priority queue example. --- Doc/library/heapq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index 86be3bdf235..c995802bbdb 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):