mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Add usage note.
This commit is contained in:
parent
c43a26da13
commit
5bc472a9a4
1 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue