a909007fef
This turns a hard crash in a recursive generator into a 'maximum recursion depth exceeded' exception.
8 lines
108 B
Python
8 lines
108 B
Python
def gen():
|
|
yield from gen()
|
|
|
|
try:
|
|
print(list(gen()))
|
|
except RuntimeError:
|
|
print("RuntimeError")
|