summaryrefslogtreecommitdiffstats
path: root/Doc/howto/functional.rst
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2016-08-09 21:47:04 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2016-08-09 21:47:04 (GMT)
commit378a1d77d9f257a914a35dbbfdf16bd8a8f3ef36 (patch)
tree21a0a5f52763d83788779c5f1b55228e020e980c /Doc/howto/functional.rst
parent2f47fb00211ab99924ea5ae2d576bc3c6ba8952f (diff)
downloadcpython-378a1d77d9f257a914a35dbbfdf16bd8a8f3ef36.zip
cpython-378a1d77d9f257a914a35dbbfdf16bd8a8f3ef36.tar.gz
cpython-378a1d77d9f257a914a35dbbfdf16bd8a8f3ef36.tar.bz2
Issue #27204: Fix doctests in Doc/howto
Patch by Jelle Zijlstra.
Diffstat (limited to 'Doc/howto/functional.rst')
-rw-r--r--Doc/howto/functional.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/howto/functional.rst b/Doc/howto/functional.rst
index 6e21f93..8ae9679 100644
--- a/Doc/howto/functional.rst
+++ b/Doc/howto/functional.rst
@@ -1040,7 +1040,7 @@ If you use :func:`operator.add` with :func:`functools.reduce`, you'll add up all
elements of the iterable. This case is so common that there's a special
built-in called :func:`sum` to compute it:
- >>> import functools
+ >>> import functools, operator
>>> functools.reduce(operator.add, [1,2,3,4], 0)
10
>>> sum([1,2,3,4])