From: Terry Jan Reedy Date: Mon, 16 Jun 2014 07:05:37 +0000 (-0400) Subject: Issue #19362: Tweek len() doc and docstring to expand the indicated range of X-Git-Tag: v3.4.2rc1~382 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2fb73f6757d569d176811e849a2732861ec6eb9;p=python Issue #19362: Tweek len() doc and docstring to expand the indicated range of arguments. Original patch by Gareth Rees. --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 02e6374539..ea489ac1be 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -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: diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index d351cd0281..a81af65658 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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 *