New submission from Irit Katriel <iritkatr...@gmail.com>:

The compiler has a runtime check that an "except:" without type can only be the 
last in the try block:

https://github.com/python/cpython/blob/15409c720be0503131713e3d3abc1acd0da07378/Python/compile.c#L3251

This could be detected by the parser instead.

----------
components: Parser
messages: 406495
nosy: iritkatriel, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Move runtime except: check to the parser
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45834>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to