summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-06-17 01:40:52 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-06-17 01:40:52 (GMT)
commit5bc472a9a429ff051df9415e7a61046bcd78eb51 (patch)
tree006f1958d7611c7f152d8f9c872727fcae5548e5 /Doc
parentc43a26da13693e07675e1d967d5b324fff565aa7 (diff)
downloadcpython-5bc472a9a429ff051df9415e7a61046bcd78eb51.zip
cpython-5bc472a9a429ff051df9415e7a61046bcd78eb51.tar.gz
cpython-5bc472a9a429ff051df9415e7a61046bcd78eb51.tar.bz2
Add usage note.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/itertools.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 7baa5e1..ac3b761 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -235,6 +235,10 @@ loops that truncate the stream.
yield n
n += step
+ When counting with floating point numbers, better accuracy can sometimes be
+ achieved by substituting multiplicative code such as: ``(start + step * i
+ for i in count())``.
+
.. versionchanged:: 3.1
added *step* argument and allowed non-integer arguments.