[Python-checkins] r59773 - python/trunk/Doc/library/functions.rst python/trunk/Doc/library/stdtypes.rst

georg.brandl python-checkins at python.org
Sun Jan 6 16:34:58 CET 2008


Author: georg.brandl
Date: Sun Jan  6 16:34:57 2008
New Revision: 59773

Modified:
   python/trunk/Doc/library/functions.rst
   python/trunk/Doc/library/stdtypes.rst
Log:
#1755097: document default values for [].sort() and sorted().


Modified: python/trunk/Doc/library/functions.rst
==============================================================================
--- python/trunk/Doc/library/functions.rst	(original)
+++ python/trunk/Doc/library/functions.rst	Sun Jan  6 16:34:57 2008
@@ -1038,10 +1038,11 @@
    *cmp* specifies a custom comparison function of two arguments (iterable
    elements) which should return a negative, zero or positive number depending on
    whether the first argument is considered smaller than, equal to, or larger than
-   the second argument: ``cmp=lambda x,y: cmp(x.lower(), y.lower())``
+   the second argument: ``cmp=lambda x,y: cmp(x.lower(), y.lower())``.  The default
+   value is ``None``.
 
    *key* specifies a function of one argument that is used to extract a comparison
-   key from each list element: ``key=str.lower``
+   key from each list element: ``key=str.lower``.  The default value is ``None``.
 
    *reverse* is a boolean value.  If set to ``True``, then the list elements are
    sorted as if each comparison were reversed.

Modified: python/trunk/Doc/library/stdtypes.rst
==============================================================================
--- python/trunk/Doc/library/stdtypes.rst	(original)
+++ python/trunk/Doc/library/stdtypes.rst	Sun Jan  6 16:34:57 2008
@@ -1408,10 +1408,11 @@
    *cmp* specifies a custom comparison function of two arguments (list items) which
    should return a negative, zero or positive number depending on whether the first
    argument is considered smaller than, equal to, or larger than the second
-   argument: ``cmp=lambda x,y: cmp(x.lower(), y.lower())``
+   argument: ``cmp=lambda x,y: cmp(x.lower(), y.lower())``.  The default value
+   is ``None``.
 
    *key* specifies a function of one argument that is used to extract a comparison
-   key from each list element: ``key=str.lower``
+   key from each list element: ``key=str.lower``.  The default value is ``None``.
 
    *reverse* is a boolean value.  If set to ``True``, then the list elements are
    sorted as if each comparison were reversed.


More information about the Python-checkins mailing list