From: Georg Brandl Date: Sun, 18 Sep 2011 05:40:05 +0000 (+0200) Subject: Fix bug in heapq priority queue example. X-Git-Tag: v3.2.3rc1~563 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d678f841363d8636cb02510d31e4e4fb9d8815f;p=thirdparty%2FPython%2Fcpython.git Fix bug in heapq priority queue example. --- diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index c8634ba29154..2ab632fb8ece 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):