This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: heapq docs clarification
Type: Stage:
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, rhettinger
Priority: normal Keywords:

Created on 2010-11-23 08:10 by georg.brandl, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg122203 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-23 08:10
On the python-docs mailing list, a user suggested to rewrite the first paragraph of the heapq docs like this.  Are you okay with this change, Raymond?


Heaps are trees for which every parent node has a value less than or equal to
any of its children.  This implementation uses arrays for which ``heap[k] <=
heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k*, counting elements from
zero.  For the sake of comparison, non-existing elements are considered to be
infinite.  The interesting property of a heap is that its smallest element is
always the root, ``heap[0]``.
msg122205 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2010-11-23 08:24
That looks fine.  Perhaps s/trees/binary trees
msg122206 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-23 08:38
Great!  Applied in r86708.
History
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54720
2010-11-23 08:38:09georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg122206
2010-11-23 08:24:37rhettingersetassignee: rhettinger -> georg.brandl
messages: + msg122205
2010-11-23 08:10:10georg.brandlcreate