Skip to content

Commit 715a6e5

Browse files
author
raymond.hettinger
committed
Issue 5171: itertools.product docstring missing 'repeat' argument
git-svn-id: http://svn.python.org/projects/python/trunk@69466 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent c5b0f68 commit 715a6e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/itertoolsmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,9 @@ For example, product(A, B) returns the same as: ((x,y) for x in A for y in B).\
19701970
The leftmost iterators are in the outermost for-loop, so the output tuples\n\
19711971
cycle in a manner similar to an odometer (with the rightmost element changing\n\
19721972
on every iteration).\n\n\
1973+
To compute the product of an iterable with itself, specify the number\n\
1974+
of repetitions with the optional repeat keyword argument. For example,\n\
1975+
product(A, repeat=4) means the same as product(A, A, A, A).\n\n\
19731976
product('ab', range(3)) --> ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)\n\
19741977
product((0,1), (0,1), (0,1)) --> (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...");
19751978

0 commit comments

Comments
 (0)