cpython: 0f7eec78569c (original) (raw)

Mercurial > cpython

changeset 82215:0f7eec78569c 2.7

#17178: update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan. [#17178]

Ezio Melotti ezio.melotti@gmail.com
date Fri, 15 Feb 2013 23:35:14 +0200
parents e63c4bc81d9f
children c1b3d25882ca
files Misc/ACKS Python/bltinmodule.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-)[+] [-] Misc/ACKS 1 Python/bltinmodule.c 6

line wrap: on

line diff

--- 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

--- 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[](#l2.5) \n[](#l2.6) -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[](#l2.8) +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[](#l2.15) \n[](#l2.16) -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[](#l2.18) +If the iterable is empty, return False."); static PyObject * builtin_apply(PyObject *self, PyObject *args)