cbf981f330
This turns a hard crash in a recursive generator into a 'maximum recursion depth exceeded' exception.
10 lines
137 B
Python
10 lines
137 B
Python
# test deeply recursive generators
|
|
|
|
def gen():
|
|
yield from gen()
|
|
|
|
try:
|
|
list(gen())
|
|
except RuntimeError:
|
|
print('RuntimeError')
|