Issue 29722: heapq.merge docs are misleading with the "reversed" flag (original ) (raw ) Issue29722
Created on 2017-03-05 03:26 by adamniederer , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Pull Requests
URL
Status
Linked
Edit
PR 300
adamniederer,2017-03-05 03:26
Messages (2)
msg288997 - (view)
Author: Adam (adamniederer) *
Date: 2017-03-05 03:26
The docs for heapq.merge are a little misleading. Iterables passed into heapq.merge with the reversed flag set to True must be sorted from largest to smallest to achieve the desired sorting effect, but the paragraph describing the function in the general case states that they should be sorted from smallest to largest.
msg289449 - (view)
Author: Raymond Hettinger (rhettinger) *
Date: 2017-03-11 18:20
The PR was applied to 3.7. I don't think it is worth backing.
History
Date
User
Action
Args
2022-04-11 14:58:43
admin
set
github: 73908
2017-03-11 18:20:34
rhettinger
set
status: open -> closedresolution: fixedmessages: + stage: resolved
2017-03-10 20:29:43
terry.reedy
set
versions: - Python 3.3, Python 3.4
2017-03-05 05:00:08
rhettinger
set
assignee: docs@python -> rhettinger nosy: + rhettinger
2017-03-05 03:29:29
adamniederer
set
title: heapq.merge docs don't handle reverse flag well -> heapq.merge docs are misleading with the "reversed" flag
2017-03-05 03:26:38
adamniederer
create