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 Claudiu Saftoiu
Recipients Claudiu Saftoiu, rhettinger, xiang.zhang
Date 2016-08-04.07:54:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470297298.72.0.0111007948787.issue27678@psf.upfronthosting.co.za>
In-reply-to
Content
Ahh, I see. In that case, if the object passed-in has a length, use that. If not, then raise TypeError. e.g. proposed behavior:

>>> len(itertool.combinations(range(10), 2))
45
>>> len(itertool.combinations(iter(range(10)), 2))
...
TypeError: itertools.combinations underlying object has no len()
History
Date User Action Args
2016-08-04 07:54:58Claudiu Saftoiusetrecipients: + Claudiu Saftoiu, rhettinger, xiang.zhang
2016-08-04 07:54:58Claudiu Saftoiusetmessageid: <1470297298.72.0.0111007948787.issue27678@psf.upfronthosting.co.za>
2016-08-04 07:54:58Claudiu Saftoiulinkissue27678 messages
2016-08-04 07:54:58Claudiu Saftoiucreate