This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon, lys.nikolaou, pablogsal
Date 2021-05-06.11:31:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620300688.24.0.928024360805.issue44056@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-05-06 11:31:28Mark.Shannonsetrecipients: + Mark.Shannon, lys.nikolaou, pablogsal
2021-05-06 11:31:28Mark.Shannonsetmessageid: <1620300688.24.0.928024360805.issue44056@roundup.psfhosted.org>
2021-05-06 11:31:28Mark.Shannonlinkissue44056 messages
2021-05-06 11:31:28Mark.Shannoncreate