diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2013-11-22 20:03:10 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2013-11-22 20:03:10 (GMT) |
commit | e19e3f0b91c9186e9266e8d7ad543ff858aaf336 (patch) | |
tree | a6d4c66bcf7ffb9cf6371c72d550b9db1d4c72d1 /Doc/library/stdtypes.rst | |
parent | 58ca93cb69fc8e72e3d9fe519e2f737920522f8e (diff) | |
parent | e1391a0d68b063adfb13a48756938d19cc67c7e0 (diff) | |
download | cpython-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.rst | 3 |
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 |