[issue10511] heapq docs clarification
report at bugs.python.org
Tue Nov 23 09:10:11 CET 2010
New submission from Georg Brandl <georg at python.org>:
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``.
nosy: georg.brandl, rhettinger
title: heapq docs clarification
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list