Koos Zevenhoven <k7ho...@gmail.com> added the comment:

I'd say there are three different problems related to this:

(1) The inability of infinite iterators/iterables to say anything about their 
length

(2) The inability to interrupt C-level loops

(3) The horrible consequences of things like list(itertools.count()) that fill 
up the memory


The problems overlap only partially. Unfortunately, fixing any single one of 
these problems does not eliminate the two others. For example, (2) and (3) may 
happen just as well without the iterator protocol being involved. And (1) may 
just prevent you from checking if the iterable has enough elements for whatever 
you're doing.

----------
nosy: +koos.zevenhoven

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

Reply via email to