### Documentation The same issue as in https://discuss.python.org/t/function-definition-grammar-is-wrong/56998/7. The current grammar for `parameter_list_starargs` allows a function definition such as: ``` def f(*): ... ``` which is incorrect. One solution is to make the `[star_parameter]` not optional in the first alternative, i.e.: ``` parameter_list_starargs: "*" `star_parameter` ("," `defparameter`)* ["," [`parameter_star_kwargs`]] ``` Thank you! <!-- gh-linked-prs --> ### Linked PRs * gh-156622 * gh-156671 * gh-156672 * gh-156673 <!-- /gh-linked-prs -->
Documentation
The same issue as in https://discuss.python.org/t/function-definition-grammar-is-wrong/56998/7.
The current grammar for
parameter_list_starargsallows a function definition such as:which is incorrect.
One solution is to make the
[star_parameter]not optional in the first alternative, i.e.:Thank you!
Linked PRs