Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-129858: Special syntax error forelif block afterelse#129902
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
+137 −75
Merged
Changes from1 commit
Commits
Show all changes
12 commits Select commitHold shift + click to select a range
883ada9 Special syntax error for `elif` block after `else`
swfarnsworthfe17ada Change elif-after-else error wording to mirror patma errors
swfarnsworth345964a Test for special syntax error for elif following else
swfarnsworthbf777a2 📜🤖 Added by blurb_it.
blurb-it[bot]49b41b7 gh-129902: move code example from blurb_it to whatsnew rst.
swfarnsworthe1333c1 Merge branch 'main' into elif-error-message
hugovk116d785 Update Misc/NEWS.d/next/Core_and_Builtins/2025-02-12-01-36-13.gh-issu…
swfarnsworthdee5f1e Update Doc/whatsnew/3.14.rst
swfarnsworth090f7e1 Merge branch 'main' into elif-error-message
swfarnsworthab2224c \`\`elif\`\` -> :keyword:\`elif\`
swfarnsworth6ca3def Overwrite parser.c with current main; this version of the parser does…
swfarnsworth384c876 Recompile parser with updated elif-after-else error message
swfarnsworthFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
\
\elif\\ -> :keyword:\elif\- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitab2224cfe06e2c058dd8c9991d4f27559d20359a
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -174,7 +174,7 @@ Improved error messages | ||
| ^^^^^^^ | ||
| ValueError: too many values to unpack (expected 3, got 4) | ||
| *:keyword:`elif` statements that follow an:keyword:`else` block now have a specific error message. | ||
| (Contributed by Steele Farnsworth in :gh:`129902`.) | ||
| .. code-block:: pycon | ||
| @@ -190,7 +190,6 @@ Improved error messages | ||
| ^^^^ | ||
| SyntaxError: 'elif' block follows an 'else' block | ||
picnixz marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| * When incorrectly closed strings are detected, the error message suggests | ||
| that the string may be intended to be part of the string. (Contributed by | ||
| Pablo Galindo in :gh:`88535`.) | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.