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.merge docs are misleading with the "reversed" flag
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: adamniederer, docs@python, rhettinger
Priority: normal Keywords:

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) * (Python committer) 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:43adminsetgithub: 73908
2017-03-11 18:20:34rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg289449

stage: resolved
2017-03-10 20:29:43terry.reedysetversions: - Python 3.3, Python 3.4
2017-03-05 05:00:08rhettingersetassignee: docs@python -> rhettinger

nosy: + rhettinger
2017-03-05 03:29:29adamniederersettitle: heapq.merge docs don't handle reverse flag well -> heapq.merge docs are misleading with the "reversed" flag
2017-03-05 03:26:38adamniederercreate