From: Raymond Hettinger Date: Thu, 14 May 2009 21:52:15 +0000 (+0000) Subject: Fix error in 2-to-3 translation of docs. X-Git-Tag: 3.0~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=83ef9dfc0640606d0a333efe4bb33468b2b95687;p=thirdparty%2FPython%2Fcpython.git Fix error in 2-to-3 translation of docs. --- diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 9e3a6355051b..587cfc1b6635 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -294,7 +294,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: