Claudiu Saftoiu added the comment:

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()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27678>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to