summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-09 18:39:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-02-09 18:39:41 (GMT)
commit94034ea5842d953117e9192589d6487eb59812f1 (patch)
tree9ba531843e111abdd0eb008eb08eda4633127f8b /Modules
parentd2ea0332abe72152c4447cdd3e41f3c201d8df74 (diff)
downloadcpython-94034ea5842d953117e9192589d6487eb59812f1.zip
cpython-94034ea5842d953117e9192589d6487eb59812f1.tar.gz
cpython-94034ea5842d953117e9192589d6487eb59812f1.tar.bz2
Issue 5171: itertools.product docstring missing 'repeat' argument
Diffstat (limited to 'Modules')
-rw-r--r--Modules/itertoolsmodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index fac395f..486c2e0 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -1970,6 +1970,9 @@ For example, product(A, B) returns the same as: ((x,y) for x in A for y in B).\
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) ...");