Message187807
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]. |
|
Date |
User |
Action |
Args |
2013-04-25 19:09:34 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, r.david.murray, Claymore, allyourcode |
2013-04-25 19:09:34 | mark.dickinson | set | messageid: <1366916974.5.0.959824091607.issue17794@psf.upfronthosting.co.za> |
2013-04-25 19:09:34 | mark.dickinson | link | issue17794 messages |
2013-04-25 19:09:34 | mark.dickinson | create | |
|