[Issue 7128] Cartesian product of ranges
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 3 21:54:45 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7128
--- Comment #2 from bearophile_hugs at eml.cc 2013-01-03 21:54:44 PST ---
(In reply to comment #1)
> https://github.com/D-Programming-Language/phobos/pull/856
I guess the Python "repeat" optional argument is not supported:
>>> from itertools import product
>>> list(product("abc", repeat=4))
[('a', 'a', 'a', 'a'), ('a', 'a', 'a', 'b'), ('a', 'a', 'a', 'c'), ('a', 'a',
'b', 'a'), ('a', 'a', 'b', 'b'), ...]
So you have to write:
array(cartesianProduct("abc", "abc", "abc", "abc"))
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list