Mercurial > cpython-lru_cache-weakref
diff Modules/itertoolsmodule.c @ 51503:e759da93df64
Merged revisions 69466,69480 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69466 | raymond.hettinger | 2009-02-09 12:39:41 -0600 (Mon, 09 Feb 2009) | 3 lines
Issue 5171: itertools.product docstring missing 'repeat' argument
........
r69480 | raymond.hettinger | 2009-02-09 19:24:05 -0600 (Mon, 09 Feb 2009) | 1 line
Issue 1818: collections.namedtuple() to support automatic renaming of invalid fieldnames.
........
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Tue, 10 Feb 2009 02:41:10 +0000 |
| parents | debd14c489b9 |
| children | b0db109089c9 |
line wrap: on
line diff
--- a/Modules/itertoolsmodule.c Tue Feb 10 02:20:49 2009 +0000 +++ b/Modules/itertoolsmodule.c Tue Feb 10 02:41:10 2009 +0000 @@ -1791,6 +1791,9 @@ The leftmost iterators are in the outermost for-loop, so the output tuples\n\ cycle in a manner similar to an odometer (with the rightmost element changing\n\ on every iteration).\n\n\ +To compute the product of an iterable with itself, specify the number\n\ +of repetitions with the optional repeat keyword argument. For example,\n\ +product(A, repeat=4) means the same as product(A, A, A, A).\n\n\ product('ab', range(3)) --> ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)\n\ product((0,1), (0,1), (0,1)) --> (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...");
