MRAB wrote: > What if an _exhausted_ iterator was falsey?
Many would expect it = iter("abc") while it: print(next(it)) to work (i. e. no StopIteration) -- if it doesn't, what's the actual usecase? If it does work there must be some lookahead which not all iterators can provide in a meaningful way: it = iter(time.time, None) while it: time.sleep(...) print("Now", next(it)) -- https://mail.python.org/mailman/listinfo/python-list