-
-
Couldn't load subscription status.
- Fork 33.3k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
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