Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
The following code snippet generates a stacktrace exception pointing to a invalid line number (-1):
withobject()asobj:break
Example:
$echo'with object() as obj:\n\tbreak'> main.py$ python main.py File"/home/kartz/main.py", line -1SyntaxError:'break' outside loop
This is reproducible with Python 3.10, 3.11 and latestmaster. I could not reproduce this on Python versions older than <3.10.