From 0c54bc81d78151594b369fe8c1e1b88c44ab852d Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Mon, 29 May 2017 19:37:49 -0700 Subject: [PATCH 1/2] bpo-23787: Change sum() docstring from sequence to iterable Original patch by Raymond Hettinger. --- Python/bltinmodule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index f03e48892e45a4..31cf06bc460512 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2443,10 +2443,10 @@ builtin_sum(PyObject *self, PyObject *args) } PyDoc_STRVAR(sum_doc, -"sum(sequence[, start]) -> value\n\ +"sum(iterable[, start]) -> value\n\ \n\ -Return the sum of a sequence of numbers (NOT strings) plus the value\n\ -of parameter 'start' (which defaults to 0). When the sequence is\n\ +Return the sum of an iterable or sequence of numbers (NOT strings) \n\ +plus the value of 'start' (which defaults to 0). When the sequence is\n\ empty, return start."); From ad243f6b298448087c7c31ca7ed9b5738f4ef009 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Thu, 1 Jun 2017 14:21:25 -0700 Subject: [PATCH 2/2] removed trailing space --- Python/bltinmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 31cf06bc460512..70308e9dc9eaf4 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2445,7 +2445,7 @@ builtin_sum(PyObject *self, PyObject *args) PyDoc_STRVAR(sum_doc, "sum(iterable[, start]) -> value\n\ \n\ -Return the sum of an iterable or sequence of numbers (NOT strings) \n\ +Return the sum of an iterable or sequence of numbers (NOT strings)\n\ plus the value of 'start' (which defaults to 0). When the sequence is\n\ empty, return start.");