From: Ezio Melotti Date: Fri, 15 Feb 2013 21:35:14 +0000 (+0200) Subject: #17178: update any()/all() docstrings to document their behavior with empty iterables... X-Git-Tag: v3.2.4rc1~101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b19ed57d8d75b1183193558a9880db44b95157b3;p=python #17178: update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan. --- diff --git a/Misc/ACKS b/Misc/ACKS index 1ea66e4ebc..9ccc8e16c4 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -37,6 +37,7 @@ Erik Andersén Oliver Andrich Ross Andrus Jérémy Anger +Ankur Ankan Jon Anglin Heidi Annexstad Éric Araujo diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 35b2cdc4b2..d4bf677cb7 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)