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.
--
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 rep...@bugs.python.org
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 rep...@bugs.python.org
Tommy Carstensen added the comment:
Yes, but 3.5 has not been pre-released yet.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
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
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file35398/keymerge2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Removed file: http://bugs.python.org/file35398/keymerge2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file35399/keymerge2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file35374/keymerge.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
Python-bugs-list
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
priority: low - normal
Added file: http://bugs.python.org/file30062/heap2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file30063/heap2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Removed file: http://bugs.python.org/file30062/heap2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Mark Dickinson added the comment:
heap2.diff contains only a single line's change. Wrong file attached?
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
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 rep...@bugs.python.org
http://bugs.python.org/issue13742
___
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,
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
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:
Simon Sapin added the comment:
I just remembered about this. I suppose it is too late for 3.3?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
É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 rep...@bugs.python.org
http://bugs.python.org/issue13742
Terry J. Reedy tjre...@udel.edu added the comment:
FWIW, Guido approves of the idea, msg152969 in #4356
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
I'll look at this in the next couple of weeks. Hang tight :-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
Simon Sapin simon.sa...@kozea.fr 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:
New submission from Simon Sapin simon.sa...@kozea.fr:
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
Simon Sapin simon.sa...@kozea.fr 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
Changes by Eric V. Smith e...@trueblade.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
Simon Sapin simon.sa...@kozea.fr 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?
--
Éric Araujo mer...@netwok.org 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
Changes by Daniel Stutzbach stutzb...@google.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
Python-bugs-list
Raymond Hettinger raymond.hettin...@gmail.com 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
Simon Sapin simon.sa...@kozea.fr 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 rep...@bugs.python.org
34 matches
Mail list logo