summaryrefslogtreecommitdiffstats
path: root/Doc/reference/compound_stmts.rst
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-05-28 23:45:32 (GMT)
committerCarol Willing <carolcode@willingconsulting.com>2019-05-28 23:45:32 (GMT)
commitb76302ddd0896cb39ce69909349b53db6e7776e2 (patch)
tree5f9a80489decdb07f40e97cf618d62f0ce5b4930 /Doc/reference/compound_stmts.rst
parent77f0ed7a42606d03ebfe48ab152caf0d796d6540 (diff)
downloadcpython-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.rst6
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`]