]> 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:37 +0000 (03:05 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Mon, 16 Jun 2014 07:05:37 +0000 (03:05 -0400)
arguments. Original patch by Gareth Rees.

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

index 02e6374539d50bdc348a6fddcf70832b2ac5deec..ea489ac1be55560bc3dba5ad4ce714d92618b341 100644 (file)
@@ -742,7 +742,8 @@ are always 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).
 
 
 .. _func-list:
index d351cd02819dbc8f6df0956f3c1f6e9915f770ba..a81af65658206a17c22a07ff98db37c4143d64b2 100644 (file)
@@ -1327,7 +1327,7 @@ builtin_len(PyObject *self, PyObject *v)
 PyDoc_STRVAR(len_doc,
 "len(object)\n\
 \n\
-Return the number of items of a sequence or mapping.");
+Return the number of items of a sequence or collection.");
 
 
 static PyObject *