summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/stdlib.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tutorial/stdlib.rst')
-rw-r--r--Doc/tutorial/stdlib.rst4
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