mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#17178: update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan.
This commit is contained in:
parent
38b82543f7
commit
b19ed57d8d
2 changed files with 5 additions and 2 deletions
|
@ -262,7 +262,8 @@ builtin_all(PyObject *self, PyObject *v)
|
|||
PyDoc_STRVAR(all_doc,
|
||||
"all(iterable) -> bool\n\
|
||||
\n\
|
||||
Return True if bool(x) is True for all values x in the iterable.");
|
||||
Return True if bool(x) is True for all values x in the iterable.\n\
|
||||
If the iterable is empty, return True.");
|
||||
|
||||
static PyObject *
|
||||
builtin_any(PyObject *self, PyObject *v)
|
||||
|
@ -304,7 +305,8 @@ builtin_any(PyObject *self, PyObject *v)
|
|||
PyDoc_STRVAR(any_doc,
|
||||
"any(iterable) -> bool\n\
|
||||
\n\
|
||||
Return True if bool(x) is True for any x in the iterable.");
|
||||
Return True if bool(x) is True for any x in the iterable.\n\
|
||||
If the iterable is empty, return False.");
|
||||
|
||||
static PyObject *
|
||||
builtin_ascii(PyObject *self, PyObject *v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue