]> granicus.if.org Git - python/commitdiff
bpo-23787: Change sum() docstring from sequence to iterable (GH-1859)
authorMariatta <Mariatta@users.noreply.github.com>
Tue, 6 Jun 2017 16:12:03 +0000 (09:12 -0700)
committerGitHub <noreply@github.com>
Tue, 6 Jun 2017 16:12:03 +0000 (09:12 -0700)
* bpo-23787: Change sum() docstring from sequence to iterable

Original patch by Raymond Hettinger.

Python/bltinmodule.c

index f03e48892e45a466c8c5b365b04ee4765075d46f..70308e9dc9eaf425b2cbef0fb621ec49c8d2d149 100644 (file)
@@ -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.");