[3.13] gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (GH-122847) (#129150)
https://github.com/python/cpython/commit/508ace67057aa92d40f6f8229e3bc772288... commit: 508ace67057aa92d40f6f8229e3bc7722880e0bc branch: 3.13 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: pablogsal <Pablogsal@gmail.com> date: 2025-01-21T20:12:43Z summary: [3.13] gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (GH-122847) (#129150) gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (GH-122847) Thanks to Artur Chakhvadze for bugfix. (cherry picked from commit 610584639003317193cdcfe38bbdc8268b612828) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> files: M Doc/reference/compound_stmts.rst diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index c7e43ef773907a..e351c962d99bd4 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -1217,8 +1217,10 @@ A function definition defines a user-defined function object (see section : | `parameter_list_no_posonly` parameter_list_no_posonly: `defparameter` ("," `defparameter`)* ["," [`parameter_list_starargs`]] : | `parameter_list_starargs` - parameter_list_starargs: "*" [`star_parameter`] ("," `defparameter`)* ["," ["**" `parameter` [","]]] - : | "**" `parameter` [","] + parameter_list_starargs: "*" [`star_parameter`] ("," `defparameter`)* ["," [`parameter_star_kwargs`]] + : "*" ("," `defparameter`)+ ["," [`parameter_star_kwargs`]] + : | `parameter_star_kwargs` + parameter_star_kwargs: "**" `parameter` [","] parameter: `identifier` [":" `expression`] star_parameter: `identifier` [":" ["*"] `expression`] defparameter: `parameter` ["=" `expression`]
participants (1)
-
pablogsal