Message388375
This is not a bug. itertools.product returns an iterator: https://docs.python.org/3/glossary.html#term-iterator
Quoting from there:
> [...] every iterator is also iterable and may be used in most places where other iterables are accepted. One notable exception is code which attempts multiple iteration passes. A container object (such as a list) produces a fresh new iterator each time you pass it to the iter() function or use it in a for loop. Attempting this with an iterator will just return the same exhausted iterator object used in the previous iteration pass, making it appear like an empty container. |
|
Date |
User |
Action |
Args |
2021-03-09 19:17:16 | The Compiler | set | recipients:
+ The Compiler, marciomocellin |
2021-03-09 19:17:16 | The Compiler | set | messageid: <1615317436.75.0.0788031997256.issue43450@roundup.psfhosted.org> |
2021-03-09 19:17:16 | The Compiler | link | issue43450 messages |
2021-03-09 19:17:16 | The Compiler | create | |
|