http://d.puremagic.com/issues/show_bug.cgi?id=7128
--- Comment #3 from [email protected] 2013-02-05 18:06:03 PST --- Partially implemented: http://forum.dlang.org/thread/[email protected] Currently three or more arguments are not accepted: import std.stdio, std.algorithm; void main() { cartesianProduct([0,1], [0,1], [0,1]).writeln(); } Another interesting feature of Python itertools.product() that's missing is the optional "repeat" argument: >>> from itertools import product >>> list(product([0,1], repeat=3)) [(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)] >>> >>> list(product([0,1], repeat=4)) [(0, 0, 0, 0), (0, 0, 0, 1), (0, 0, 1, 0), (0, 0, 1, 1), (0, 1, 0, 0), (0, 1, 0, 1), (0, 1, 1, 0), (0, 1, 1, 1 ), (1, 0, 0, 0), (1, 0, 0, 1), (1, 0, 1, 0), (1, 0, 1, 1), (1, 1, 0, 0), (1, 1, 0, 1), (1, 1, 1, 0), (1, 1, 1, 1)] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
