diff options
author | Raymond Hettinger <python@rcn.com> | 2008-03-02 11:17:51 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-03-02 11:17:51 (GMT) |
commit | 2b7a5c468baa94d684704c37f91f6193a6859dfe (patch) | |
tree | 9a63621c25ee8bee8143ee4ca3daf20b6b1786f2 /Doc | |
parent | f287f177793bd01f467271f6d41899e1198fde79 (diff) | |
download | cpython-2b7a5c468baa94d684704c37f91f6193a6859dfe.zip cpython-2b7a5c468baa94d684704c37f91f6193a6859dfe.tar.gz cpython-2b7a5c468baa94d684704c37f91f6193a6859dfe.tar.bz2 |
Tighten example code.
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 f26d3bb..dafa6d8 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -381,7 +381,7 @@ loops that truncate the stream. for i in reversed(range(r)): cycles[i] -= 1 if cycles[i] == 0: - indices[:] = indices[:i] + indices[i+1:] + indices[i:i+1] + indices[i:] = indices[i+1:] + indices[i:i+1] cycles[i] = n - i else: j = cycles[i] |