diff options
| author | Raymond Hettinger <python@rcn.com> | 2008-03-02 11:17:51 +0000 |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2008-03-02 11:17:51 +0000 |
| commit | 2b7a5c468baa94d684704c37f91f6193a6859dfe (patch) | |
| tree | 9a63621c25ee8bee8143ee4ca3daf20b6b1786f2 | |
| parent | f287f177793bd01f467271f6d41899e1198fde79 (diff) | |
| download | cpython-git-2b7a5c468baa94d684704c37f91f6193a6859dfe.tar.gz | |
Tighten example code.
| -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 f26d3bbeb2..dafa6d8516 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] |
