diff options
author | Georg Brandl <georg@python.org> | 2008-02-01 11:56:49 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-02-01 11:56:49 (GMT) |
commit | f69451833191454bfef75804c2654dc37e8f3e93 (patch) | |
tree | 7e81560f5276c35f68b7b02e75feb9221a82ae5d /Doc/tutorial/stdlib.rst | |
parent | f25ef50549d9f2bcb6294fe61a9902490728edcc (diff) | |
download | cpython-f69451833191454bfef75804c2654dc37e8f3e93.zip cpython-f69451833191454bfef75804c2654dc37e8f3e93.tar.gz cpython-f69451833191454bfef75804c2654dc37e8f3e93.tar.bz2 |
Update docs w.r.t. PEP 3100 changes -- patch for GHOP by Dan Finnie.
Diffstat (limited to 'Doc/tutorial/stdlib.rst')
-rw-r--r-- | Doc/tutorial/stdlib.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst index a474975..725817c 100644 --- a/Doc/tutorial/stdlib.rst +++ b/Doc/tutorial/stdlib.rst @@ -121,7 +121,7 @@ The :mod:`math` module gives access to the underlying C library functions for floating point math:: >>> import math - >>> math.cos(math.pi / 4.0) + >>> math.cos(math.pi / 4) 0.70710678118654757 >>> math.log(1024, 2) 10.0 @@ -264,7 +264,7 @@ documentation:: >>> print(average([20, 30, 70])) 40.0 """ - return sum(values, 0.0) / len(values) + return sum(values) / len(values) import doctest doctest.testmod() # automatically validate the embedded tests |