From 1d678f841363d8636cb02510d31e4e4fb9d8815f 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 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): -- 2.40.0