I just think there should be a simple syntax to tell if an iterator is finished without actually pulling an item from it, although I’m guessing there’s a problem with generators because maybe you can’t properly tell its finished without running the generator to the end
I actually assumed it would behave that way already, so although there wouldn’t be a good reason to do this you could write:
while myiterator:
print(next(myiterator))
and have it list out the values the same way a “for” loop would.without throwing.
From experiment it appears as if an iterator is considered “True” if it was created with items in, and remains true even when finished. In contrast if I had a list and progressively popped items it would become empty and evaluate as False eventually.