A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026840.html below:

Priority queue (binary heap) python code

[Python-Dev] Re: Priority queue (binary heap) python codeFrançois Pinard pinard@iro.umontreal.ca
20 Jul 2002 08:24:45 -0400
[Guido van Rossum]

> Oh, and maybe we can borrow a few lines of François's description of
> the algorithm. :-)

Borrow liberally!  I would prefer that nothing worth remains un-borrowed
from mine, so I can happily get rid of my copy when the time comes! :-)

> I propose to call it heapq.py.  (Got a better name?  Now or never.)

I like `heapq' as it is not an English common name, like `heap' would be,
so less likely to clash with user chosen variable names!  This principle
should be good in general.

Sub-classing `heapq' from `list' is a good idea!

P.S. - In other languages, I have been using `string' a lot, and this has
been one of the minor irritations when I came to Python, that it forced
me away of that identifier; so I'm now using `text' everywhere, instead.
Another example is the name `socket', which is kind of reserved from the
module name, I never really know how to name variables holding sockets :-).

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4