Fix bug in heapq priority queue example.

This commit is contained in:
Georg Brandl 2011-09-18 07:40:05 +02:00
parent 21c69b1043
commit 607cc361bb
1 changed files with 1 additions and 1 deletions

View File

@ -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):