mirror of
https://github.com/python/cpython.git
synced 2025-10-03 21:55:41 +00:00
gh-94996: Disallow parsing pos only params with feature_version < (3, 8) (GH-94997)
(cherry picked from commit b5e3ea2862
)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
parent
7fdda1a47f
commit
4abf84602f
5 changed files with 15 additions and 6 deletions
|
@ -287,9 +287,9 @@ params[arguments_ty]:
|
|||
|
||||
parameters[arguments_ty]:
|
||||
| a=slash_no_default b[asdl_arg_seq*]=param_no_default* c=param_with_default* d=[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=slash_with_default b=param_with_default* c=[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*]=param_no_default+ b=param_with_default* c=[star_etc] {
|
||||
_PyPegen_make_arguments(p, NULL, NULL, a, b, c) }
|
||||
| a=param_with_default+ b=[star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue