mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 04:30:24 +01:00
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')
|