From: Terry Jan Reedy Date: Mon, 16 Jun 2014 07:05:30 +0000 (-0400) Subject: Issue #19362: Tweek len() doc and docstring to expand the indicated range of X-Git-Tag: v2.7.8~37^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f2dcd227ce0784faec41fd696438e00c3dd2604;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 76564142e6..80ce681348 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -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]) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index d22dca2f48..f0525742ee 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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 *