summaryrefslogtreecommitdiffstats
path: root/Doc/library/stdtypes.rst
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-11-22 20:03:10 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-11-22 20:03:10 (GMT)
commite19e3f0b91c9186e9266e8d7ad543ff858aaf336 (patch)
treea6d4c66bcf7ffb9cf6371c72d550b9db1d4c72d1 /Doc/library/stdtypes.rst
parent58ca93cb69fc8e72e3d9fe519e2f737920522f8e (diff)
parente1391a0d68b063adfb13a48756938d19cc67c7e0 (diff)
downloadcpython-e19e3f0b91c9186e9266e8d7ad543ff858aaf336.zip
cpython-e19e3f0b91c9186e9266e8d7ad543ff858aaf336.tar.gz
cpython-e19e3f0b91c9186e9266e8d7ad543ff858aaf336.tar.bz2
Issue #18326: merge with 3.3
Diffstat (limited to 'Doc/library/stdtypes.rst')
-rw-r--r--Doc/library/stdtypes.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 8c11c1b..6635b0e 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1149,6 +1149,9 @@ application).
fail, the entire sort operation will fail (and the list will likely be left
in a partially modified state).
+ :meth:`sort` accepts two arguments that can only be passed by keyword
+ (:ref:`keyword-only arguments <keyword-only_parameter>`):
+
*key* specifies a function of one argument that is used to extract a
comparison key from each list element (for example, ``key=str.lower``).
The key corresponding to each item in the list is calculated once and