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 /Grammar | |
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 'Grammar')
-rw-r--r-- | Grammar/python.gram | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram index afae85d..d4df78b 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -830,9 +830,9 @@ lambda_params[arguments_ty]: # lambda_parameters[arguments_ty]: | a=lambda_slash_no_default b[asdl_arg_seq*]=lambda_param_no_default* c=lambda_param_with_default* d=[lambda_star_etc] { - _PyPegen_make_arguments(p, a, NULL, b, c, d) } + CHECK_VERSION(arguments_ty, 8, "Positional-only parameters are", _PyPegen_make_arguments(p, a, NULL, b, c, d)) } | a=lambda_slash_with_default b=lambda_param_with_default* c=[lambda_star_etc] { - _PyPegen_make_arguments(p, NULL, a, NULL, b, c) } + CHECK_VERSION(arguments_ty, 8, "Positional-only parameters are", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) } | a[asdl_arg_seq*]=lambda_param_no_default+ b=lambda_param_with_default* c=[lambda_star_etc] { _PyPegen_make_arguments(p, NULL, NULL, a, b, c) } | a=lambda_param_with_default+ b=[lambda_star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)} |