Commit 7c8494b6 authored by Raymond Hettinger's avatar Raymond Hettinger

Fix error in 2-to-3 translation of docs.

parent 2ca24f02
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment