Mar-30-2021, 09:19 AM
(This post was last modified: Mar-30-2021, 09:19 AM by Gribouillis.)
If you want to pass it you need to say what the program has to do when there are no more items in the sequence
try: tq, q = next(self.incoming) except StopIteration: # No more items in self.incoming --> what to do here?You can also catch the exception at higher level in the calling stack.