Skip to content

Commit 4b53bf3

Browse files
author
Steele Farnsworth
committed
Change elif-after-else error wording to mirror patma errors
1 parent 883ada9 commit 4b53bf3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Grammar/python.gram

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ invalid_elif_stmt:
13961396
invalid_else_stmt:
13971397
| a='else' ':' NEWLINE !INDENT {
13981398
RAISE_INDENTATION_ERROR("expected an indented block after 'else' statement on line %d", a->lineno) }
1399-
| 'else' ':' block 'elif' { RAISE_SYNTAX_ERROR("elif not allowed after else")}
1399+
| 'else' ':' block 'elif' { RAISE_SYNTAX_ERROR("'elif' block follows an 'else' block")}
14001400
invalid_while_stmt:
14011401
| 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") }
14021402
| a='while' named_expression ':' NEWLINE !INDENT {

Parser/parser.c

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)