Message304607
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. |
|
Date |
User |
Action |
Args |
2017-10-19 07:50:58 | ncoghlan | set | recipients:
+ ncoghlan, rhettinger, serhiy.storchaka, koos.zevenhoven |
2017-10-19 07:50:58 | ncoghlan | set | messageid: <1508399458.93.0.213398074469.issue31815@psf.upfronthosting.co.za> |
2017-10-19 07:50:58 | ncoghlan | link | issue31815 messages |
2017-10-19 07:50:58 | ncoghlan | create | |
|