Skip to content

Commit f3816fb

Browse files
OTheDevJelleZijlstra
authored andcommitted
pythongh-101777: Make PriorityQueue docs slightly clearer (python#102026)
Adjust wording slightly, and use min(entries) instead of sorted(list(entries))[0] as an example.
1 parent 95e4c76 commit f3816fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/queue.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ The :mod:`queue` module defines the following classes and exceptions:
5757
*maxsize* is less than or equal to zero, the queue size is infinite.
5858

5959
The lowest valued entries are retrieved first (the lowest valued entry is the
60-
one returned by ``sorted(list(entries))[0]``). A typical pattern for entries
61-
is a tuple in the form: ``(priority_number, data)``.
60+
one that would be returned by ``min(entries)``). A typical pattern for
61+
entries is a tuple in the form: ``(priority_number, data)``.
6262

6363
If the *data* elements are not comparable, the data can be wrapped in a class
6464
that ignores the data item and only compares the priority number::

0 commit comments

Comments
 (0)