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: v2.7.4rc1~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94bf697b01f56b99bfd3edaf72b7f4893d80c122;p=thirdparty%2FPython%2Fcpython.git #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 cd7ffeeb8b74..94210ef62a12 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -33,6 +33,7 @@ Pehr Anderson Erik Andersén Oliver Andrich Ross Andrus +Ankur Ankan Heidi Annexstad Éric Araujo Jeffrey Armstrong diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index d25b14c06170..cdc908084fc2 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)