bpo-43149: Correct the syntax error message for multiple exception types (GH-25996) GH-25997)

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 6692dc1ca9)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-05-09 14:13:50 -07:00 committed by GitHub
parent c3eb3c18f1
commit 9a0e65c8e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 8 deletions

View file

@ -19978,7 +19978,7 @@ invalid_except_stmt_rule(Parser *p)
)
{
D(fprintf(stderr, "%*c+ invalid_except_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'except' expression ',' expressions ['as' NAME] ':'"));
_res = RAISE_SYNTAX_ERROR_STARTING_FROM ( a , "exception group must be parenthesized" );
_res = RAISE_SYNTAX_ERROR_STARTING_FROM ( a , "multiple exception types must be parenthesized" );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
D(p->level--);