A `StopIteration` exception propagates out of a generator function unexpectedly.What Python version behavior causes this?