Skip to content

Add a key parameter (like sorted) to heapq.merge #57951

@ssapin

Description

@ssapin
mannequin
BPO 13742
Nosy @rhettinger, @terryjreedy, @mdickinson, @giampaolo, @merwok, @ericsnowcurrently, @berkerpeksag, @serhiy-storchaka
Files
  • heapq_merge_key.patch: 'hg diff' output against rev ca2a35140e6a
  • benchmark_heapq_merge.py: benchmark several implementations
  • heapq_merge_key_duplicate.patch: 'hg diff' output against rev ca2a35140e6a
  • heap.diff: Rough draft (untested) for a Heap() class
  • heap2.diff: Update the draft Heap() class
  • keymerge.diff: Draft patch without doc updates
  • keymerge2.diff: Add both key=func and reverse=True options
  • 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/rhettinger'
    closed_at = <Date 2014-05-30.09:29:28.655>
    created_at = <Date 2012-01-09.10:35:41.807>
    labels = ['type-feature', 'library']
    title = 'Add a key parameter (like sorted) to heapq.merge'
    updated_at = <Date 2015-01-10.08:47:47.975>
    user = 'https://bugs.python.org/ssapin'

    bugs.python.org fields:

    activity = <Date 2015-01-10.08:47:47.975>
    actor = 'terry.reedy'
    assignee = 'rhettinger'
    closed = True
    closed_date = <Date 2014-05-30.09:29:28.655>
    closer = 'rhettinger'
    components = ['Library (Lib)']
    creation = <Date 2012-01-09.10:35:41.807>
    creator = 'ssapin'
    dependencies = []
    files = ['24184', '24185', '24248', '29578', '30063', '35374', '35399']
    hgrepos = []
    issue_num = 13742
    keywords = ['patch', 'needs review']
    message_count = 21.0
    messages = ['150927', '150928', '150931', '150954', '150969', '150983', '151369', '152802', '152984', '168070', '168116', '185259', '188066', '188067', '188080', '188085', '219380', '233792', '233793', '233795', '233804']
    nosy_count = 12.0
    nosy_names = ['rhettinger', 'terry.reedy', 'mark.dickinson', 'giampaolo.rodola', 'stutzbach', 'eric.araujo', 'python-dev', 'eric.snow', 'berker.peksag', 'ssapin', 'serhiy.storchaka', 'Tommy.Carstensen']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13742'
    versions = ['Python 3.5']

    Metadata

    Metadata

    Assignees

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions