mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
Fix the example output of count().
This commit is contained in:
parent
ee31e31db3
commit
37a80dc7bc
@ -246,7 +246,7 @@ loops that truncate the stream.
|
||||
|
||||
def count(start=0, step=1):
|
||||
# count(10) --> 10 11 12 13 14 ...
|
||||
# count(2.5, 0.5) -> 3.5 3.0 4.5 ...
|
||||
# count(2.5, 0.5) -> 2.5 3.0 3.5 ...
|
||||
n = start
|
||||
while True:
|
||||
yield n
|
||||
|
Loading…
Reference in New Issue
Block a user