Files
TencentOS-tiny/components/language/micropython/tests/basics/try_continue.py
2022-09-29 12:10:37 +08:00

14 lines
252 B
Python

# test continue within exception handler
def f():
lst = [1, 2, 3]
for x in lst:
print('a', x)
try:
if x == 2:
raise Exception
except Exception:
continue
print('b', x)
f()