diff options
author | Raymond Hettinger <python@rcn.com> | 2009-05-14 21:48:02 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-05-14 21:48:02 (GMT) |
commit | 7c8494b6e24b6efcef6386e0bb921cd08ecc68c6 (patch) | |
tree | 29ea2f2649c5f32ea7f2ea22095f00c7f31994d5 /Doc | |
parent | 2ca24f022ed226cbe48012b5ea82da36025f33f2 (diff) | |
download | cpython-7c8494b6e24b6efcef6386e0bb921cd08ecc68c6.zip cpython-7c8494b6e24b6efcef6386e0bb921cd08ecc68c6.tar.gz cpython-7c8494b6e24b6efcef6386e0bb921cd08ecc68c6.tar.bz2 |
Fix error in 2-to-3 translation of docs.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/itertools.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 899f8c6..fa4484d 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -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: |