
24 Jun
2002
24 Jun
'02
10 p.m.
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