summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-03-25 15:33:31 (GMT)
committerGeorg Brandl <georg@python.org>2008-03-25 15:33:31 (GMT)
commit545d300be0cdebae42e5a596fb84ab4366883e50 (patch)
treefed49c7f307256f017bde4f96a7c622dad135d6a
parentcc47b05fe5c66bb2f1e520234039070044dad218 (diff)
downloadcpython-545d300be0cdebae42e5a596fb84ab4366883e50.zip
cpython-545d300be0cdebae42e5a596fb84ab4366883e50.tar.gz
cpython-545d300be0cdebae42e5a596fb84ab4366883e50.tar.bz2
Fix duplicated paragraph.
-rw-r--r--Doc/howto/functional.rst13
1 files changed, 0 insertions, 13 deletions
diff --git a/Doc/howto/functional.rst b/Doc/howto/functional.rst
index a81e5eb..faa0418 100644
--- a/Doc/howto/functional.rst
+++ b/Doc/howto/functional.rst
@@ -670,19 +670,6 @@ If the iterable returns no values at all, a :exc:`TypeError` exception is
raised. If the initial value is supplied, it's used as a starting point and
``func(initial_value, A)`` is the first calculation. ::
-
-``reduce(func, iter, [initial_value])`` doesn't have a counterpart in the
-:mod:`itertools` module because it cumulatively performs an operation on all the
-iterable's elements and therefore can't be applied to infinite iterables.
-``func`` must be a function that takes two elements and returns a single value.
-:func:`reduce` takes the first two elements A and B returned by the iterator and
-calculates ``func(A, B)``. It then requests the third element, C, calculates
-``func(func(A, B), C)``, combines this result with the fourth element returned,
-and continues until the iterable is exhausted. If the iterable returns no
-values at all, a :exc:`TypeError` exception is raised. If the initial value is
-supplied, it's used as a starting point and ``func(initial_value, A)`` is the
-first calculation.
-
>>> import operator
>>> reduce(operator.concat, ['A', 'BB', 'C'])
'ABBC'