[Python-checkins] r69466 - python/trunk/Modules/itertoolsmodule.c
raymond.hettinger
python-checkins at python.org
Mon Feb 9 19:39:41 CET 2009
Author: raymond.hettinger
Date: Mon Feb 9 19:39:41 2009
New Revision: 69466
Log:
Issue 5171: itertools.product docstring missing 'repeat' argument
Modified:
python/trunk/Modules/itertoolsmodule.c
Modified: python/trunk/Modules/itertoolsmodule.c
==============================================================================
--- python/trunk/Modules/itertoolsmodule.c (original)
+++ python/trunk/Modules/itertoolsmodule.c Mon Feb 9 19:39:41 2009
@@ -1970,6 +1970,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) ...");
More information about the Python-checkins
mailing list