Files
openide/python/testData/highlighting/continueBreakReturnInExceptStar.py
andrey.matveev ecd113fc12 PY-52930 Support except star
(cherry picked from commit 4d03313cce07e4c3ff4748328cf2e04ba74b8d91)

IJ-MR-24242

GitOrigin-RevId: fa6c1b9077ef78b35c8f3453debcf06bcbc96364
2022-05-18 00:19:37 +00:00

13 lines
506 B
Python

def foo(x):
for i in range(0, x):
try:
...
except* TypeError:
if x == 1:
<error descr="'break', 'continue' and 'return' cannot appear in an except* block">return 1</error>
if x == 2:
<error descr="'break', 'continue' and 'return' cannot appear in an except* block">continue</error>
if x == 3:
<error descr="'break', 'continue' and 'return' cannot appear in an except* block">break</error>