diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-15 23:35:14 +0200 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-15 23:35:14 +0200 |
commit | 94bf697b01f56b99bfd3edaf72b7f4893d80c122 (patch) | |
tree | 9503d96907d912f4d0daaef4901c0ff27e2d577e /Python | |
parent | f1575714fff00b3fd69fde68f2242e468ac47485 (diff) | |
download | cpython-git-94bf697b01f56b99bfd3edaf72b7f4893d80c122.tar.gz |
#17178: update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index d25b14c061..cdc908084f 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -120,7 +120,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) @@ -162,7 +163,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_apply(PyObject *self, PyObject *args) |