]> granicus.if.org Git - python/commitdiff
Issue #19362: Tweek len() doc and docstring to expand the indicated range of
authorTerry Jan Reedy <tjreedy@udel.edu>
Mon, 16 Jun 2014 07:05:30 +0000 (03:05 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Mon, 16 Jun 2014 07:05:30 +0000 (03:05 -0400)
arguments. Original patch by Gareth Rees.

Doc/library/functions.rst
Python/bltinmodule.c

index 76564142e6b4c41c48e4728fd20db406b4756dec..80ce681348a1a483ad911bead7f1f570eee5fe6c 100644 (file)
@@ -726,7 +726,8 @@ available.  They are listed here in alphabetical order.
 .. function:: len(s)
 
    Return the length (the number of items) of an object.  The argument may be a
-   sequence (string, tuple or list) or a mapping (dictionary).
+   sequence (such as a string, bytes, tuple, list, or range) or a collection
+   (such as a dictionary, set, or frozen set).
 
 
 .. function:: list([iterable])
index d22dca2f4879528cc002667fbbe900efee2cb6ea..f0525742eecb0385ace844c17e2d588ed2c25b8f 100644 (file)
@@ -1323,7 +1323,7 @@ builtin_len(PyObject *self, PyObject *v)
 PyDoc_STRVAR(len_doc,
 "len(object) -> integer\n\
 \n\
-Return the number of items of a sequence or mapping.");
+Return the number of items of a sequence or collection.");
 
 
 static PyObject *