New submission from Mark Shannon <m...@hotpy.org>:
Consider this function, which has a syntax error on line 4. >>> def f(): ... try: ... 1/0 ... except: ... pass ... except Exception: ... pass 3.9 reports an incorrect line number of 3. 3.10b reports an even more incorrect line number of -1. Although I've marked this as a "Parser" bug, the offending code is in the compiler. For 3.11, this is fixed by https://github.com/python/cpython/pull/25729 ---------- assignee: Mark.Shannon components: Parser messages: 393083 nosy: Mark.Shannon, lys.nikolaou, pablogsal priority: release blocker severity: normal stage: needs patch status: open title: Incorrect line number for syntax error. type: behavior versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44056> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com