[issue17794] Priority Queue

Daniel Wong report at bugs.python.org
Thu Apr 25 07:48:55 CEST 2013


Daniel Wong added the comment:

from the peanut gallery:

This looks right to me; you are seeing that PriorityQueue is trying to compare dicts, because that's how tuple comparison works: it is lexicographic. Since the first element of the two tuples that you are trying to insert have the same value, comparison of the two tuple reduces to comparing the second elements.

Your work around also looks good to me.

----------
components: +Library (Lib) -Interpreter Core
nosy: +allyourcode

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17794>
_______________________________________


More information about the Python-bugs-list mailing list