[issue10109] itertools.product with infinite iterator cause MemoryError.
Tim Peters
report at bugs.python.org
Sat Sep 17 16:43:38 EDT 2016
Tim Peters added the comment:
I see nothing wrong with combinatorial generators materializing their inputs before generation. Perhaps it should be documented clearly. It's certainly not limited to `product()`. For example,
>>> for i in itertools.combinations(itertools.count(), 2):
... print(i)
dies with MemoryError too. But I expected that ;-)
----------
nosy: +tim.peters
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10109>
_______________________________________
More information about the Python-bugs-list
mailing list