diff -r d9a3d23cf8f0 Doc/library/functions.rst --- a/Doc/library/functions.rst Tue Oct 14 00:53:13 2014 +0200 +++ b/Doc/library/functions.rst Wed Oct 15 10:01:48 2014 +0100 @@ -1285,6 +1285,11 @@ 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 `_\.