diff options
author | Sandro Tosi <sandro.tosi@gmail.com> | 2011-12-25 16:25:45 (GMT) |
---|---|---|
committer | Sandro Tosi <sandro.tosi@gmail.com> | 2011-12-25 16:25:45 (GMT) |
commit | 7386662699daa0ee0e8fb42a94954c404860c4a6 (patch) | |
tree | 424ec300f597b018cc8acb5f50d8fb639a5f308d /Doc/library/itertools.rst | |
parent | 3e6c814b9d38abb7cb02bd228bceb6e3c51b27d7 (diff) | |
download | cpython-7386662699daa0ee0e8fb42a94954c404860c4a6.zip cpython-7386662699daa0ee0e8fb42a94954c404860c4a6.tar.gz cpython-7386662699daa0ee0e8fb42a94954c404860c4a6.tar.bz2 |
use list() to wrap range() in itertools.permutations() example; thanks to Romain MORLEVAT from docs@
Diffstat (limited to 'Doc/library/itertools.rst')
-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 28625e8..68a6c83 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -419,7 +419,7 @@ loops that truncate the stream. if r > n: return indices = list(range(n)) - cycles = range(n, n-r, -1) + cycles = list(range(n, n-r, -1)) yield tuple(pool[i] for i in indices[:r]) while n: for i in reversed(range(r)): |