summaryrefslogtreecommitdiffstats
path: root/Doc/howto/doanddont.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-09-23 13:44:44 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-09-23 13:44:44 (GMT)
commit0931042997e5b43acb8971e3f15deb0c06050089 (patch)
tree28264ceda330bac3df6ce54b5b0dfe4e26525ae9 /Doc/howto/doanddont.rst
parentb8401c7cb175fdb4584fce8b847de5e8b7e15034 (diff)
downloadcpython-0931042997e5b43acb8971e3f15deb0c06050089.zip
cpython-0931042997e5b43acb8971e3f15deb0c06050089.tar.gz
cpython-0931042997e5b43acb8971e3f15deb0c06050089.tar.bz2
fix some more cases of reduce's move to functools from Tim Pietzcker
Diffstat (limited to 'Doc/howto/doanddont.rst')
-rw-r--r--Doc/howto/doanddont.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/howto/doanddont.rst b/Doc/howto/doanddont.rst
index 5bd2eac..99d28a8 100644
--- a/Doc/howto/doanddont.rst
+++ b/Doc/howto/doanddont.rst
@@ -236,7 +236,7 @@ sequence with comparable semantics, for example, yet many people write their own
::
import sys, operator, functools
- nums = map(float, sys.argv[1:])
+ nums = list(map(float, sys.argv[1:]))
print(functools.reduce(operator.add, nums) / len(nums))
This cute little script prints the average of all numbers given on the command