[issue13742] Add a key parameter (like sorted) to heapq.merge

2015-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: You can set up mecurial on your machine, make a read-only clone of the cpython repository, and compile it just as do other people, whether core-developers or otherwise. See docs.python.org/devguide for details. --

[issue13742] Add a key parameter (like sorted) to heapq.merge

2015-01-09 Thread Tommy Carstensen
Tommy Carstensen added the comment: Yes, but 3.5 has not been pre-released yet. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13742] Add a key parameter (like sorted) to heapq.merge

2015-01-09 Thread Berker Peksag
Berker Peksag added the comment: Hi Tommy, the patch is already committed to Python 3.5. See https://docs.python.org/3.5/library/heapq.html#heapq.merge -- nosy: +berker.peksag stage: patch review -> resolved ___ Python tracker

[issue13742] Add a key parameter (like sorted) to heapq.merge

2015-01-09 Thread Tommy Carstensen
Tommy Carstensen added the comment: I noticed 3.5 alpha1 is not released until February 1st. Is there any way I can get my hands on this new functionality? -- nosy: +Tommy.Carstensen ___ Python tracker ___

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset f5521f5dec4a by Raymond Hettinger in branch 'default': Issue #13742: Add key and reverse parameters to heapq.merge() http://hg.python.org/cpython/rev/f5521f5dec4a -- nosy: +python-dev ___ Python tracker

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file35399/keymerge2.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file35398/keymerge2.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file35398/keymerge2.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file35374/keymerge.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-12 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is already one heap class in the stdlib: queue.PriorityQueue. Why create a duplicate instead extend queue.PriorityQueue with desired features? May be name the maxheap parameter as reverse? -- nosy: +serhiy.storchaka ___

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: Looks pretty good to me. - There's a bonus print call in the diff. - Should the "len(self._data)" call be protected by the lock? I can't immediately think of any reason why that would be necessary (e.g., pushpop nd poppush never change the size of self._data

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, I see the new file now (I'd failed to refresh my browser); sorry for the noise. -- ___ Python tracker ___

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: heap2.diff contains only a single line's change. Wrong file attached? -- nosy: +mark.dickinson ___ Python tracker ___ _

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-04-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file30062/heap2.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-04-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file30063/heap2.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-04-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: low -> normal Added file: http://bugs.python.org/file30062/heap2.diff ___ Python tracker ___ _

[issue13742] Add a key parameter (like sorted) to heapq.merge

2013-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching a rough draft implementation for a fully encapsulated Heap() class that is thread-safe, supports minheaps and maxheaps, and efficiently implements key-functions (called no more than once per key). -- Added file: http://bugs.python.org/file

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-08-13 Thread Éric Araujo
Éric Araujo added the comment: Yes, 3.3 is already in beta. -- keywords: +needs review stage: -> patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ __

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-08-13 Thread Simon Sapin
Simon Sapin added the comment: I just remembered about this. I suppose it is too late for 3.3? -- ___ Python tracker ___ ___ Python-bu

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-02-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: FWIW, Guido approves of the idea, msg152969 in #4356 -- nosy: +terry.reedy ___ Python tracker ___ _

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-02-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll look at this in the next couple of weeks. Hang tight :-) -- ___ Python tracker ___ ___ Pyt

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-16 Thread Simon Sapin
Simon Sapin added the comment: heapq_merge_key_duplicate.patch is a new patch with two code path. It also updates the function’s docstring (which the previous patch did not). Raymond, do you think the speed is worth the DRY violation? -- Added file: http://bugs.python.org/file24248/he

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
Simon Sapin added the comment: Raymond, please have a look at merge_3 in benchmark_heapq_merge.py. It is implemented as you say. Do you think the speed is worth the code duplication? -- ___ Python tracker __

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Simon, please keep the original version fast by creating two code paths: if key is None: original_code else: new_code using the key_function -- priority: normal -> low ___ Python tracker

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Éric Araujo
Éric Araujo added the comment: Yes, 3.3 is still in the early development stage, and new features will be accepted until the first beta (in June, see PEP 398). “.. versionadded:: 3.3 The *key* parameter” will do. -- nosy: +eric.araujo versions: -Python 3.4 _

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
Simon Sapin added the comment: Oops, the patch to the documentation would also need 'New in 3.3: the key parameter', with the right Sphinx directive. But that depends on whether this change ends up in 3.3 or 3.4. Does 3.3 still get new features? -- __

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
Simon Sapin added the comment: The attached script benchmarks the basline (current implementation) against 3 new implementations, as suggested on http://mail.python.org/pipermail/python-ideas/2012-January/013296.html On my machine, the output is: merge_baseline per run, min of 3 = 7.

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
New submission from Simon Sapin : Hi, The attached patch adds a 'key' optional parameter to the heapq.merge function that behaves as in sorted(). Related discussion: http://mail.python.org/pipermail/python-ideas/2012-January/013295.html This is my first contribution to CPython. -- c