This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Claymore, allyourcode, mark.dickinson, r.david.murray, rhettinger
Date 2013-04-25.19:09:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366916974.5.0.959824091607.issue17794@psf.upfronthosting.co.za>
In-reply-to
Content
Hmm.  It's true that Python 3's comparison rules make PriorityQueue a bit less useful in its current form.

One possible workaround could be to introduce an optional "key" argument to the constructor that provides a callable used to map objects added to the queue to their priorities.  The default key would map each object to itself, as before, but for a use-case like this one the key could just be lambda x: x[0].
History
Date User Action Args
2013-04-25 19:09:34mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, r.david.murray, Claymore, allyourcode
2013-04-25 19:09:34mark.dickinsonsetmessageid: <1366916974.5.0.959824091607.issue17794@psf.upfronthosting.co.za>
2013-04-25 19:09:34mark.dickinsonlinkissue17794 messages
2013-04-25 19:09:34mark.dickinsoncreate