summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-02-14 13:34:38 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-02-14 13:34:38 (GMT)
commit7f73295966733ba99581c660944e8894f753edcc (patch)
treedf7b729ce091ac44b8e8e9bbbdba50740ab6054e /Doc
parent7116186691681cddb96ea60276af0a343ac98e9e (diff)
downloadcpython-7f73295966733ba99581c660944e8894f753edcc.zip
cpython-7f73295966733ba99581c660944e8894f753edcc.tar.gz
cpython-7f73295966733ba99581c660944e8894f753edcc.tar.bz2
Note the the sort arguments are required to be keywords.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index c90b0a5..58905e0 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1266,7 +1266,7 @@ Note that while lists allow their items to be of any type, bytearray object
| ``s.reverse()`` | reverses the items of *s* in | \(6) |
| | place | |
+------------------------------+--------------------------------+---------------------+
-| ``s.sort([key[, reverse]])`` | sort the items of *s* in place | (6), (7) |
+| ``s.sort([key[, reverse]])`` | sort the items of *s* in place | (6), (7), (8) |
+------------------------------+--------------------------------+---------------------+
.. index::
@@ -1315,10 +1315,8 @@ Notes:
sequence.
(7)
- :meth:`sort` is not supported by :class:`bytearray` objects.
-
The :meth:`sort` method takes optional arguments for controlling the
- comparisons.
+ comparisons. Each must be specified as a keyword argument.
*key* specifies a function of one argument that is used to extract a comparison
key from each list element: ``key=str.lower``. The default value is ``None``.
@@ -1336,6 +1334,8 @@ Notes:
makes the list appear empty for the duration, and raises :exc:`ValueError` if it
can detect that the list has been mutated during a sort.
+(8)
+ :meth:`sort` is not supported by :class:`bytearray` objects.
.. _bytes-methods: