This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: In documentation Section 8.6, the definition of parameter_list need correcting
Type: Stage: resolved
Components: Documentation Versions: Python 3.11
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, pablogsal, terry.reedy, webbnh
Priority: normal Keywords:

Created on 2021-05-04 20:08 by webbnh, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (5)
msg392943 - (view) Author: Webb Scales (webbnh) Date: 2021-05-04 20:08
In Section 8.6 ("Function definitions"; https://docs.python.org/3/reference/compound_stmts.html#function-definitions), the definition of "parameter_list" looks slightly wrong:

parameter_list ::= defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] | parameter_list_no_posonly

The "/" (and the comma preceding it) is not a required component.  (Sorry, I'm afraid I'm not smart enough right now to suggest a correction.  :-p )
msg394126 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-05-21 16:42
I *think* that another bracket pair is needed, changing
"," "/"
to
["," "/"]
msg394130 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-05-21 17:23
I think is correct:

parameter_list ::= defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] | parameter_list_no_posonly

Says "a parameter_list" is either:

defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] 

or

parameter_list_no_posonly

If you don't use the "/" then is the second option.

Feel free to reopen if I am missing something.
msg394132 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-05-21 17:28
After mentally reparsing and translating to English, I think you are right.
msg394168 - (view) Author: Webb Scales (webbnh) Date: 2021-05-21 23:01
I concur -- it is correct as it is:  I wasn't properly interpreting the alternation.

Thank you for your attention; sorry for the false alarm!
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88204
2021-05-21 23:01:46webbnhsetmessages: + msg394168
2021-05-21 17:28:39terry.reedysetmessages: + msg394132
2021-05-21 17:23:02pablogsalsetstatus: open -> closed
resolution: not a bug
messages: + msg394130

stage: resolved
2021-05-21 16:42:14terry.reedysetnosy: + terry.reedy, pablogsal

messages: + msg394126
versions: + Python 3.11, - Python 3.9
2021-05-04 20:08:08webbnhcreate