[docs] Possible typo in docs
Andrew McFarland
andrew.mcfarland at outlook.com
Wed Apr 6 06:42:16 EDT 2016
page in question: https://docs.python.org/2/library/heapq.html
section: 8.4.2. Priority Queue Implementation Notes
Currently:
def remove_task(task): 'Mark an existing task as REMOVED. Raise KeyError if not found.' entry = entry_finder.pop(task) entry[-1] = REMOVED
As it stands, 'task' is removed from dictionary 'entry_finder' and never replaced which is not the intention in my opinion.
Possible fixes:
1.def remove_task(task): 'Mark an existing task as REMOVED. Raise KeyError if not found.' entry = entry_finder.pop(task) entry[-1] = REMOVED entry_finder[task] = entry
2.def remove_task(task): 'Mark an existing task as REMOVED. Raise KeyError if not found.' entry_finder[task][-1] = REMOVED
Sincerely,AM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20160406/1ad2b2cb/attachment.html>
More information about the docs
mailing list