File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -634,6 +634,10 @@ are always available. They are listed here in alphabetical order.
634634 The optional keyword-only *key * argument specifies a one-argument ordering
635635 function like that used for :meth: `list.sort `.
636636
637+ If multiple items are maximal, the function returns the first one encountered.
638+ This is consistent with other sort-stability preserving tools such as
639+ ``sorted(iterable, key=keyfunc, reverse=True)[0]` and
640+ ``heapq.nlargest(1, iterable, key=keyfunc) ``.
637641
638642.. function :: memoryview(obj)
639643 :noindex:
@@ -651,6 +655,10 @@ are always available. They are listed here in alphabetical order.
651655 The optional keyword-only *key * argument specifies a one-argument ordering
652656 function like that used for :meth: `list.sort `.
653657
658+ If multiple items are minimal, the function returns the first one encountered.
659+ This is consistent with other sort-stability preserving tools such as
660+ ``sorted(iterable, key=keyfunc)[0]` and
661+ ``heapq.nsmallest(1, iterable, key=keyfunc) ``.
654662
655663.. function :: next(iterator[, default])
656664
You can’t perform that action at this time.
0 commit comments