diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2022-09-05 16:54:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 16:54:09 (GMT) |
commit | 2c7d2e8d46164efb6e27a64081d8e949f6876515 (patch) | |
tree | 20cdb1ece49de9a14c731c62ab31dcab7929da09 /Parser/parser.c | |
parent | a9d58feccfd956dc99195af6872b06446738d7db (diff) | |
download | cpython-2c7d2e8d46164efb6e27a64081d8e949f6876515.zip cpython-2c7d2e8d46164efb6e27a64081d8e949f6876515.tar.gz cpython-2c7d2e8d46164efb6e27a64081d8e949f6876515.tar.bz2 |
gh-96587: Raise `SyntaxError` for PEP654 on older `feature_version` (#96588)
Diffstat (limited to 'Parser/parser.c')
-rw-r--r-- | Parser/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/parser.c b/Parser/parser.c index c9366d5..bec51fe 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -6970,7 +6970,7 @@ try_stmt_rule(Parser *p) UNUSED(_end_lineno); // Only used by EXTRA macro int _end_col_offset = _token->end_col_offset; UNUSED(_end_col_offset); // Only used by EXTRA macro - _res = _PyAST_TryStar ( b , ex , el , f , EXTRA ); + _res = CHECK_VERSION ( stmt_ty , 11 , "Exception groups are" , _PyAST_TryStar ( b , ex , el , f , EXTRA ) ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; p->level--; |