Open graingert opened 3 years ago
catch StopIteration around 1-arg next in generator functions
example from https://www.python.org/dev/peps/pep-0479/#converting-the-exception-inside-next
input:
def my_generator(): ... yield next(it) ...
expected output:
def my_generator(): try: ... yield next(it) ... except StopIteration return
Description
catch StopIteration around 1-arg next in generator functions
example from https://www.python.org/dev/peps/pep-0479/#converting-the-exception-inside-next
input:
expected output:
Details