Nick Coghlan <ncogh...@gmail.com> added the comment:

I'd personally be happy enough if the infinite iterators implemented 
__length_hint__() as always raising TypeError so the machine-breaking cases of 
incremental consumption of ever-increasing amounts of memory were blocked - I 
was suggesting on python-ideas that enabling pervasive signal checking would be 
too intrusive for anyone to be willing to implement it.

However, Serhiy's patch showed me that it isn't particularly intrusive at all, 
and the risk of surprising consumers is low, since __next__() methods can 
already raise arbitrary exceptions.

----------

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

Reply via email to