[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

Raymond Hettinger report at bugs.python.org
Sun Sep 24 13:18:22 EDT 2017


Raymond Hettinger added the comment:

Nick, what do you think about this proposal?

The problem being solved is that decorated tuples no longer work well for controlling ordering (because so many types are now non-comparable).  This provides a wrapper to control which fields are used in comparison.

For implementation and API, there are several ways to do it, (accept separate arguments vs accept an existing sequence, standalone class vs a tuple subclass, pure python and/or c-implementation, etc).

----------
nosy: +ncoghlan
priority: normal -> low

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31145>
_______________________________________


More information about the Python-bugs-list mailing list