circuitpython/tests/basics/try_continue.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
252 B
Python
Raw Normal View History

# 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()