#17178: update any()/all() docstrings to document their behavior with empty iterables...
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 15 Feb 2013 21:35:14 +0000 (23:35 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 15 Feb 2013 21:35:14 +0000 (23:35 +0200)
Misc/ACKS
Python/bltinmodule.c

index cd7ffeeb8b7424c7cd4840adf13ad2965b8de5c5..94210ef62a129d533f23394615210c5baf4794bd 100644 (file)
--- 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
index d25b14c061703c78e71a1d5c053dc4229483adbc..cdc908084fc243a568563dbdfba48b4c71945d6f 100644 (file)
@@ -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)