check('class foo:return 1', 1, 11)
check('def f():\n continue', 2, 3)
check('def f():\n break', 2, 3)
- check('try:\n pass\nexcept:\n pass\nexcept ValueError:\n pass', 2, 3)
+ check('try:\n pass\nexcept:\n pass\nexcept ValueError:\n pass', 3, 1)
# Errors thrown by tokenizer.c
check('(0x+1)', 1, 3)
for (i = 0; i < n; i++) {
excepthandler_ty handler = (excepthandler_ty)asdl_seq_GET(
s->v.Try.handlers, i);
+ SET_LOC(c, handler);
if (!handler->v.ExceptHandler.type && i < n-1)
return compiler_error(c, "default 'except:' must be last");
- SET_LOC(c, handler);
except = compiler_new_block(c);
if (except == NULL)
return 0;