Commit 9f2dcd22 authored by Terry Jan Reedy's avatar Terry Jan Reedy

Issue #19362: Tweek len() doc and docstring to expand the indicated range of

arguments. Original patch by Gareth Rees.
parent 357d312f
......@@ -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])
......
......@@ -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 *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment