]> granicus.if.org Git - python/commitdiff
[Bug #1619674] Make sum() use the term iterable, not sequence
authorAndrew M. Kuchling <amk@amk.ca>
Wed, 20 Dec 2006 19:57:10 +0000 (19:57 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Wed, 20 Dec 2006 19:57:10 +0000 (19:57 +0000)
Doc/lib/libfuncs.tex

index dc52915c9283f82dfd02d9f0aebcaabe2934c5fd..4f41002508e3f901fde922322d2e04ae5ef4e5d9 100644 (file)
@@ -1087,11 +1087,11 @@ class C:
   string, \code{''}.
 \end{funcdesc}
 
-\begin{funcdesc}{sum}{sequence\optional{, start}}
-  Sums \var{start} and the items of a \var{sequence}, from left to
-  right, and returns the total.  \var{start} defaults to \code{0}.
-  The \var{sequence}'s items are normally numbers, and are not allowed
-  to be strings.  The fast, correct way to concatenate sequence of
+\begin{funcdesc}{sum}{iterable\optional{, start}}
+  Sums \var{start} and the items of an \var{iterable} from left to
+  right and returns the total.  \var{start} defaults to \code{0}.
+  The \var{iterable}'s items are normally numbers, and are not allowed
+  to be strings.  The fast, correct way to concatenate sequence of
   strings is by calling \code{''.join(\var{sequence})}.
   Note that \code{sum(range(\var{n}), \var{m})} is equivalent to
   \code{reduce(operator.add, range(\var{n}), \var{m})}