This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients eric.araujo, falsetru, rhettinger, terry.reedy
Date 2010-10-15.21:18:43
SpamBayes Score 1.349821e-06
Marked as misclassified No
Message-id <1287177525.4.0.175854710696.issue10109@psf.upfronthosting.co.za>
In-reply-to
Content
The input to itertools.product must be a finite sequence of finite iterables. itertools.count(startvalue) produces an infinite sequence of ints (which are not iterable). Passing the latter to the former causes the latter to run until memory is exhausted. You should get the same result with tuple(itertools.count()), which is what happens within itertools.product.

Your generator example does not show the same problem because it is not nested and never runs.

If you are unfamiliar with Python and its stdlib, please ask questions on python-list (mirror on comp.lang.python and gmane.comp.python.general) before reporting what you think might be an error.
History
Date User Action Args
2010-10-15 21:18:45terry.reedysetrecipients: + terry.reedy, rhettinger, falsetru, eric.araujo
2010-10-15 21:18:45terry.reedysetmessageid: <1287177525.4.0.175854710696.issue10109@psf.upfronthosting.co.za>
2010-10-15 21:18:43terry.reedylinkissue10109 messages
2010-10-15 21:18:43terry.reedycreate