mirror of https://github.com/python/cpython
Fix error in 2-to-3 translation of docs.
This commit is contained in:
parent
2ca24f022e
commit
7c8494b6e2
|
@ -361,7 +361,7 @@ loops that truncate the stream.
|
|||
# islice('ABCDEFG', 2, None) --> C D E F G
|
||||
# islice('ABCDEFG', 0, None, 2) --> A C E G
|
||||
s = slice(*args)
|
||||
it = range(s.start or 0, s.stop or sys.maxsize, s.step or 1)
|
||||
it = iter(range(s.start or 0, s.stop or sys.maxsize, s.step or 1))
|
||||
nexti = next(it)
|
||||
for i, element in enumerate(iterable):
|
||||
if i == nexti:
|
||||
|
|
Loading…
Reference in New Issue