diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-05-09 21:13:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-09 21:13:50 (GMT) |
commit | 9a0e65c8e05fdcd2207650d216ebdacdf0a025e9 (patch) | |
tree | 98debb9543f1bfb22862c8b7a9409daf5fa33f24 /Grammar | |
parent | c3eb3c18f1472b739db486c99f7f2125c4809680 (diff) | |
download | cpython-9a0e65c8e05fdcd2207650d216ebdacdf0a025e9.zip cpython-9a0e65c8e05fdcd2207650d216ebdacdf0a025e9.tar.gz cpython-9a0e65c8e05fdcd2207650d216ebdacdf0a025e9.tar.bz2 |
bpo-43149: Correct the syntax error message for multiple exception types (GH-25996) GH-25997)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 6692dc1ca99fb34a19d0a4b93cf8e10619490001)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/python.gram | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram index 2f553c6..6b815ab 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -956,7 +956,7 @@ invalid_try_stmt: RAISE_INDENTATION_ERROR("expected an indented block after 'try' statement on line %d", a->lineno) } invalid_except_stmt: | 'except' a=expression ',' expressions ['as' NAME ] ':' { - RAISE_SYNTAX_ERROR_STARTING_FROM(a, "exception group must be parenthesized") } + RAISE_SYNTAX_ERROR_STARTING_FROM(a, "multiple exception types must be parenthesized") } | a='except' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") } | a='except' NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") } invalid_finally_stmt: |