[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Sumudu Fernando
Sumudu Fernando sumu...@gmail.com added the comment: I don't agree with the response to this. It is true that as implemented (at least in 2.7, I don't have 3.x handy to check) itertools.product requires finite iterables. However this seems to be simply a consequence of the implementation

[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Sumudu Fernando
Sumudu Fernando sumu...@gmail.com added the comment: tuple(itertools.cycle(enumerate(it)) for it in itertools.count()) ... TypeError: 'int' object is not iterable That is not what happens in the function, though! That would correspond to doing product(*itertools.count(2010)), but if you