[Python-checkins] r72644 - python/branches/py3k/Doc/library/itertools.rst

raymond.hettinger python-checkins at python.org
Thu May 14 23:48:02 CEST 2009


Author: raymond.hettinger
Date: Thu May 14 23:48:02 2009
New Revision: 72644

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

Modified:
   python/branches/py3k/Doc/library/itertools.rst

Modified: python/branches/py3k/Doc/library/itertools.rst
==============================================================================
--- python/branches/py3k/Doc/library/itertools.rst	(original)
+++ python/branches/py3k/Doc/library/itertools.rst	Thu May 14 23:48:02 2009
@@ -361,7 +361,7 @@
           # 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:


More information about the Python-checkins mailing list