mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)
* bpo-36540: Documentation for PEP570 - Python positional only arguments * fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments * Update reference for compound statements * Apply suggestions from Carol Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Update Doc/tutorial/controlflow.rst Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Add extra bullet point and minor edits
This commit is contained in:
parent
77f0ed7a42
commit
b76302ddd0
5 changed files with 182 additions and 10 deletions
|
|
@ -483,8 +483,10 @@ A function definition defines a user-defined function object (see section
|
|||
decorators: `decorator`+
|
||||
decorator: "@" `dotted_name` ["(" [`argument_list` [","]] ")"] NEWLINE
|
||||
dotted_name: `identifier` ("." `identifier`)*
|
||||
parameter_list: `defparameter` ("," `defparameter`)* ["," [`parameter_list_starargs`]]
|
||||
: | `parameter_list_starargs`
|
||||
parameter_list: `defparameter` ("," `defparameter`)* ',' '/' [',' [`parameter_list_no_posonly`]]
|
||||
: | `parameter_list_no_posonly`
|
||||
parameter_list_no_posonly: `defparameter` ("," `defparameter`)* ["," [`parameter_list_starargs`]]
|
||||
: | `parameter_list_starargs`
|
||||
parameter_list_starargs: "*" [`parameter`] ("," `defparameter`)* ["," ["**" `parameter` [","]]]
|
||||
: | "**" `parameter` [","]
|
||||
parameter: `identifier` [":" `expression`]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue