Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/stdlib.rst @ 45084:38604fa2a48f
Update docs w.r.t. PEP 3100 changes -- patch for GHOP by Dan Finnie.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 01 Feb 2008 11:56:49 +0000 |
| parents | 95d6fe2e8e0e |
| children | 346a99df5889 |
line wrap: on
line diff
--- a/Doc/tutorial/stdlib.rst Fri Feb 01 11:30:18 2008 +0000 +++ b/Doc/tutorial/stdlib.rst Fri Feb 01 11:56:49 2008 +0000 @@ -121,7 +121,7 @@ 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 @@ >>> 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
