diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-09-23 13:44:44 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-09-23 13:44:44 (GMT) |
commit | 0931042997e5b43acb8971e3f15deb0c06050089 (patch) | |
tree | 28264ceda330bac3df6ce54b5b0dfe4e26525ae9 /Doc/howto/doanddont.rst | |
parent | b8401c7cb175fdb4584fce8b847de5e8b7e15034 (diff) | |
download | cpython-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.rst | 2 |
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 |