mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-94996: Disallow parsing pos only params with feature_version < (3, 8) (GH-94997)
This commit is contained in:
parent
d2373fcb49
commit
b5e3ea2862
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