From: Georg Brandl Date: Sun, 18 Sep 2011 05:40:05 +0000 (+0200) Subject: Fix bug in heapq priority queue example. X-Git-Tag: v2.7.3rc1~448 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=607cc361bb489bb5d860ef162bcf91a7c7795d42;p=python Fix bug in heapq priority queue example. --- diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index 86be3bdf23..c995802bbd 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):