[Python-checkins] r53112 - python/trunk/Doc/lib/libfuncs.tex
andrew.kuchling
python-checkins at python.org
Wed Dec 20 20:57:10 CET 2006
Author: andrew.kuchling
Date: Wed Dec 20 20:57:10 2006
New Revision: 53112
Modified:
python/trunk/Doc/lib/libfuncs.tex
Log:
[Bug #1619674] Make sum() use the term iterable, not sequence
Modified: python/trunk/Doc/lib/libfuncs.tex
==============================================================================
--- python/trunk/Doc/lib/libfuncs.tex (original)
+++ python/trunk/Doc/lib/libfuncs.tex Wed Dec 20 20:57:10 2006
@@ -1087,11 +1087,11 @@
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 a 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})}
More information about the Python-checkins
mailing list