summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libfuncs.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-26 20:49:04 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-26 20:49:04 (GMT)
commit0919a1a07b061ef9a8a94cc1d92c1895b00967cb (patch)
tree812681b0b579aa36b1117b192c016b7f90ada6b0 /Doc/lib/libfuncs.tex
parent6a2a2a08329567ea41f4f073cb43e487f83872c7 (diff)
downloadcpython-0919a1a07b061ef9a8a94cc1d92c1895b00967cb.zip
cpython-0919a1a07b061ef9a8a94cc1d92c1895b00967cb.tar.gz
cpython-0919a1a07b061ef9a8a94cc1d92c1895b00967cb.tar.bz2
Part of SF patch #1513870 (the still relevant part) -- add reduce() to
functools, and adjust docs etc.
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r--Doc/lib/libfuncs.tex15
1 files changed, 0 insertions, 15 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex
index 65b0bf5..c9e35b5 100644
--- a/Doc/lib/libfuncs.tex
+++ b/Doc/lib/libfuncs.tex
@@ -836,19 +836,6 @@ class Parrot(object):
\end{verbatim}
\end{funcdesc}
-\begin{funcdesc}{reduce}{function, sequence\optional{, initializer}}
- Apply \var{function} of two arguments cumulatively to the items of
- \var{sequence}, from left to right, so as to reduce the sequence to
- a single value. For example, \code{reduce(lambda x, y: x+y, [1, 2,
- 3, 4, 5])} calculates \code{((((1+2)+3)+4)+5)}. The left argument,
- \var{x}, is the accumulated value and the right argument, \var{y},
- is the update value from the \var{sequence}. If the optional
- \var{initializer} is present, it is placed before the items of the
- sequence in the calculation, and serves as a default when the
- sequence is empty. If \var{initializer} is not given and
- \var{sequence} contains only one item, the first item is returned.
-\end{funcdesc}
-
\begin{funcdesc}{reload}{module}
Reload a previously imported \var{module}. The
argument must be a module object, so it must have been successfully
@@ -1058,8 +1045,6 @@ class C:
The \var{sequence}'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})}
\versionadded{2.3}
\end{funcdesc}