summaryrefslogtreecommitdiffstats
path: root/Doc/library/functools.rst
diff options
context:
space:
mode:
authorBrendan Jurd <direvus@gmail.com>2018-10-01 06:52:10 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2018-10-01 06:52:10 (GMT)
commit9df100286b35f1f9fa85976d573981f558805b3f (patch)
tree11addd680d19e03a24d0762981d087927f698a0e /Doc/library/functools.rst
parent5fa247d60d4f3f2b8c8ae8cb57363aca234344c2 (diff)
downloadcpython-9df100286b35f1f9fa85976d573981f558805b3f.zip
cpython-9df100286b35f1f9fa85976d573981f558805b3f.tar.gz
cpython-9df100286b35f1f9fa85976d573981f558805b3f.tar.bz2
Fix name of argument in docs for functools.reduce(). (#9634)
Diffstat (limited to 'Doc/library/functools.rst')
-rw-r--r--Doc/library/functools.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
index 214d573..7d59ec9 100644
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -280,14 +280,14 @@ The :mod:`functools` module defines the following functions:
.. function:: reduce(function, iterable[, initializer])
- Apply *function* of two arguments cumulatively to the items of *sequence*, from
- left to right, so as to reduce the sequence to a single value. For example,
+ Apply *function* of two arguments cumulatively to the items of *iterable*, from
+ left to right, so as to reduce the iterable to a single value. For example,
``reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])`` calculates ``((((1+2)+3)+4)+5)``.
The left argument, *x*, is the accumulated value and the right argument, *y*, is
- the update value from the *sequence*. If the optional *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 *initializer* is not given and
- *sequence* contains only one item, the first item is returned.
+ the update value from the *iterable*. If the optional *initializer* is present,
+ it is placed before the items of the iterable in the calculation, and serves as
+ a default when the iterable is empty. If *initializer* is not given and
+ *iterable* contains only one item, the first item is returned.
Roughly equivalent to::