diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-05-28 23:45:32 (GMT) |
---|---|---|
committer | Carol Willing <carolcode@willingconsulting.com> | 2019-05-28 23:45:32 (GMT) |
commit | b76302ddd0896cb39ce69909349b53db6e7776e2 (patch) | |
tree | 5f9a80489decdb07f40e97cf618d62f0ce5b4930 /Doc/reference/compound_stmts.rst | |
parent | 77f0ed7a42606d03ebfe48ab152caf0d796d6540 (diff) | |
download | cpython-b76302ddd0896cb39ce69909349b53db6e7776e2.zip cpython-b76302ddd0896cb39ce69909349b53db6e7776e2.tar.gz cpython-b76302ddd0896cb39ce69909349b53db6e7776e2.tar.bz2 |
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
Diffstat (limited to 'Doc/reference/compound_stmts.rst')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 42fa864..bf53cb5 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -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`] |