diff options
author | Georg Brandl <georg@python.org> | 2011-09-18 07:40:05 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-09-18 07:40:05 +0200 |
commit | b573ef1055db03aabc60cd77a3b770d33a198d4d (patch) | |
tree | cf4dfdb9001bb00d7e706ec49e327fa8a4e76be0 | |
parent | 7d670ca34bd935e59cefe8634182d9443bee3704 (diff) | |
download | cpython-b573ef1055db03aabc60cd77a3b770d33a198d4d.tar.gz |
Fix bug in heapq priority queue example.
-rw-r--r-- | Doc/library/heapq.rst | 2 |
1 files changed, 1 insertions, 1 deletions
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): |