[Python-ideas] Heap data type

Facundo Batista facundobatista at gmail.com
Mon Dec 7 11:36:34 CET 2009


On Sat, Apr 18, 2009 at 8:40 PM, Raymond Hettinger <python at rcn.com> wrote:

> Facundo, I would like to work with you on this.
> I've been the primary maintainer for heapq for a while
> and had already started working on something like this
> in response to repeated requested to support a key= function
> (like that for sorted/min/max).

After a not much complicated, but different year (I had a kid!), I'm
bringing this thread back to live.

There were different proposals of different people about what to do
after my initial mail, we can separate them in two sections:

- Move the Heap class to the collections module: I'm just changing the
heapq module to have an OO interface, instead a bunch of functions.
I'm +0 to moving it to "collections", but note that even after the
reordering of the stdlib for Py3, the heapq module remained there.

- Add functionality to the Heap class: I'm +0 to this, but I don't
want to stop this change in function of further functionality... I
propose to have the same functionality, in an OO and less error prone
way. We can add more functionality afterwards.

What do you think?

Raymond, let's work together... but don't know where. The Heap class
is already coded in my first mail, if you want to start from there and
add functionality, I'm +0. If you want me to add tests and push the
inclusion of that class into the module, just tell me. Something else,
I'm all ears, :)

Regards,

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/



More information about the Python-ideas mailing list