mirror of
https://github.com/python/cpython.git
synced 2025-09-25 09:50:37 +00:00
#17178: update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan.
This commit is contained in:
parent
f1575714ff
commit
94bf697b01
2 changed files with 5 additions and 2 deletions
|
@ -33,6 +33,7 @@ Pehr Anderson
|
||||||
Erik Andersén
|
Erik Andersén
|
||||||
Oliver Andrich
|
Oliver Andrich
|
||||||
Ross Andrus
|
Ross Andrus
|
||||||
|
Ankur Ankan
|
||||||
Heidi Annexstad
|
Heidi Annexstad
|
||||||
Éric Araujo
|
Éric Araujo
|
||||||
Jeffrey Armstrong
|
Jeffrey Armstrong
|
||||||
|
|
|
@ -120,7 +120,8 @@ builtin_all(PyObject *self, PyObject *v)
|
||||||
PyDoc_STRVAR(all_doc,
|
PyDoc_STRVAR(all_doc,
|
||||||
"all(iterable) -> bool\n\
|
"all(iterable) -> bool\n\
|
||||||
\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 *
|
static PyObject *
|
||||||
builtin_any(PyObject *self, PyObject *v)
|
builtin_any(PyObject *self, PyObject *v)
|
||||||
|
@ -162,7 +163,8 @@ builtin_any(PyObject *self, PyObject *v)
|
||||||
PyDoc_STRVAR(any_doc,
|
PyDoc_STRVAR(any_doc,
|
||||||
"any(iterable) -> bool\n\
|
"any(iterable) -> bool\n\
|
||||||
\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 *
|
static PyObject *
|
||||||
builtin_apply(PyObject *self, PyObject *args)
|
builtin_apply(PyObject *self, PyObject *args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue