mirror of
https://github.com/licsber/micropython.git
synced 2024-09-21 17:40:24 +08:00
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')
|