On Sun, 26 Jul 2009 20:10:00 -0400, Terry Reedy wrote:

> Michal Kwiatkowski wrote:
> 
>> The thing is I don't need the next item. I need to know if the
>> generator has stopped without invoking it.
> 
> Write a one-ahead iterator class, which I have posted before, that sets
> .exhausted to True when next fails.


And hope that the generator doesn't have side-effects...


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to