summaryrefslogtreecommitdiffstats
path: root/Doc/howto/functional.rst
diff options
context:
space:
mode:
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])