Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heapq docs clarification #54720

Closed
birkenfeld opened this issue Nov 23, 2010 · 3 comments
Closed

heapq docs clarification #54720

birkenfeld opened this issue Nov 23, 2010 · 3 comments
Assignees

Comments

@birkenfeld
Copy link
Member

BPO 10511
Nosy @birkenfeld, @rhettinger

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2010-11-23.08:38:09.048>
created_at = <Date 2010-11-23.08:10:10.197>
labels = []
title = 'heapq docs clarification'
updated_at = <Date 2010-11-23.08:38:09.046>
user = 'https://github.com/birkenfeld'

bugs.python.org fields:

activity = <Date 2010-11-23.08:38:09.046>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2010-11-23.08:38:09.048>
closer = 'georg.brandl'
components = []
creation = <Date 2010-11-23.08:10:10.197>
creator = 'georg.brandl'
dependencies = []
files = []
hgrepos = []
issue_num = 10511
keywords = []
message_count = 3.0
messages = ['122203', '122205', '122206']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'rhettinger']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue10511'
versions = []

@birkenfeld
Copy link
Member Author

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].

@rhettinger
Copy link
Contributor

That looks fine. Perhaps s/trees/binary trees

@rhettinger rhettinger assigned birkenfeld and unassigned rhettinger Nov 23, 2010
@birkenfeld
Copy link
Member Author

Great! Applied in r86708.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants