Bug report
Bug description:
The doc of itertools.product() say below so the default value of *iterables is () and the default value of repeat is 1:
itertools.product(*iterables, repeat=1)
Then, setting no arguments to itertools.product() returns () as shown below:
from itertools import product
v = product()
print(next(v)) # ()
print(next(v)) # StopIteration:
But explicitly setting () and repeat=1 to itertools.product() doesn't return () as shown below:
from itertools import product
v = product((), repeat=1)
print(next(v)) # StopIteration:
So, explicitly setting () and repeat=1 to itertools.product() should return ().
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Bug report
Bug description:
The doc of
itertools.product()say below so the default value of*iterablesis()and the default value ofrepeatis1:Then, setting no arguments to
itertools.product()returns()as shown below:But explicitly setting
()andrepeat=1toitertools.product()doesn't return()as shown below:So, explicitly setting
()andrepeat=1toitertools.product()should return().CPython versions tested on:
3.12
Operating systems tested on:
Windows