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-June/025895.html below:

[Python-Dev] Priority queue (binary heap) python code

[Python-Dev] Priority queue (binary heap) python code [Python-Dev] Priority queue (binary heap) python codeSkip Montanaro skip@pobox.com
Mon, 24 Jun 2002 21:00:49 -0500
    Kevin> I often find myself needing priority queues in python, and I've
    Kevin> finally broken down and written a simple implementation.

Hmmm...  I don't see a priority associated with items when you push them
onto the queue in heappush().  This seems somewhat different than my notion
of a priority queue.

Seems to me that you could implement the type of priority queue I'm think of
rather easily using a class that wraps a list of Queue.Queue objects.  Am I
missing something obvious?

-- 
Skip Montanaro
skip@pobox.com
consulting: http://manatee.mojam.com/~skip/resume.html




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