diff options
author | Shantanu <12621235+hauntsaninja@users.noreply.github.com> | 2022-08-12 18:41:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-12 18:41:02 (GMT) |
commit | a965db37f27ffb232312bc13d9a509f0d93fcd20 (patch) | |
tree | bf7580bafffed26950a1d9ba5b5982b6b7e78d75 /Parser | |
parent | b5e3ea286289fcad12be78480daf3756e350f69f (diff) | |
download | cpython-a965db37f27ffb232312bc13d9a509f0d93fcd20.zip cpython-a965db37f27ffb232312bc13d9a509f0d93fcd20.tar.gz cpython-a965db37f27ffb232312bc13d9a509f0d93fcd20.tar.bz2 |
gh-94996: Disallow lambda pos only params with feature_version < (3, 8) (GH-95934)
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/parser.c b/Parser/parser.c index 15e833a..c9366d5 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -14659,7 +14659,7 @@ lambda_parameters_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ lambda_parameters[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_no_default lambda_param_no_default* lambda_param_with_default* lambda_star_etc?")); - _res = _PyPegen_make_arguments ( p , a , NULL , b , c , d ); + _res = CHECK_VERSION ( arguments_ty , 8 , "Positional-only parameters are" , _PyPegen_make_arguments ( p , a , NULL , b , c , d ) ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; p->level--; @@ -14689,7 +14689,7 @@ lambda_parameters_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ lambda_parameters[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default lambda_param_with_default* lambda_star_etc?")); - _res = _PyPegen_make_arguments ( p , NULL , a , NULL , b , c ); + _res = CHECK_VERSION ( arguments_ty , 8 , "Positional-only parameters are" , _PyPegen_make_arguments ( p , NULL , a , NULL , b , c ) ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; p->level--; |