-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error messages for non-matching elif
/else
statements
#89920
Comments
While fixing errors in a program, I encountered this: if a == b + 2:
c = sqrt(b) + a**2
elif a == b + 3:
^^^^
SyntaxError: Invalid syntax It should be giving an |
I'd like to expand this to more than just |
elif
inside if
block is a SyntaxError
elif
/else
statements with uninformative errors
elif
/else
statements with uninformative errorselif
/else
statements
CC @pablogsal . |
ISTM that error messages was improved in #29513. Can we close this as completed, or is there remaining actionable items? |
I think we can close this, yes. |
This introduced a regression; it might need to be reverted for 3.13.0b2. See #119724 |
The commit was reverted. Re-opening in case someone wants to take another stab at this. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: