summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-02-15 21:35:14 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-02-15 21:35:14 (GMT)
commitb19ed57d8d75b1183193558a9880db44b95157b3 (patch)
treea3061e15149c873f71bbb586d2177d63c73b5faa /Python
parent38b82543f7f38d7e23586e6773e0e114d335f22d (diff)
downloadcpython-b19ed57d8d75b1183193558a9880db44b95157b3.zip
cpython-b19ed57d8d75b1183193558a9880db44b95157b3.tar.gz
cpython-b19ed57d8d75b1183193558a9880db44b95157b3.tar.bz2
#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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 35b2cdc..d4bf677 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -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)