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.
tjr -- http://mail.python.org/mailman/listinfo/python-list