summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 8b69b62..3766d43 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1286,6 +1286,11 @@ are always available. They are listed here in alphabetical order.
Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a
*key* function.
+ The built-in :func:`sorted` function is guaranteed to be stable. A sort is
+ stable if it guarantees not to change the relative order of elements that
+ compare equal --- this is helpful for sorting in multiple passes (for
+ example, sort by department, then by salary grade).
+
For sorting examples and a brief sorting tutorial, see `Sorting HowTo
<http://wiki.python.org/moin/HowTo/Sorting/>`_\.