summaryrefslogtreecommitdiffstats
path: root/Doc/howto/doanddont.rst
diff options
context:
space:
mode:
authorJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-02-19 18:52:21 (GMT)
committerJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-02-19 18:52:21 (GMT)
commit5149742e8b3c8221d4cb53dcfc9a12ae3fec9238 (patch)
treed3b7dbc021eeed177f453603f8f59f0ad01b2e0e /Doc/howto/doanddont.rst
parenta630735b31b5ee0a1a59b3b28299e26a7ee74d9f (diff)
downloadcpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.zip
cpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.tar.gz
cpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.tar.bz2
Since we recommend one module per import line, reflect this also in the
documentation.
Diffstat (limited to 'Doc/howto/doanddont.rst')
-rw-r--r--Doc/howto/doanddont.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/howto/doanddont.rst b/Doc/howto/doanddont.rst
index a56fb8c..b4f271e 100644
--- a/Doc/howto/doanddont.rst
+++ b/Doc/howto/doanddont.rst
@@ -267,7 +267,8 @@ sequence with comparable semantics, for example, yet many people write their own
:func:`max`/:func:`min`. Another highly useful function is :func:`reduce`. A
classical use of :func:`reduce` is something like ::
- import sys, operator
+ import operator
+ import sys
nums = map(float, sys.argv[1:])
print reduce(operator.add, nums)/len(nums)