[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

Pablo Galindo Salgado report at bugs.python.org
Tue Mar 17 10:13:55 EDT 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> Did I miss something?

Yep, what you are missing is that the rule is really:

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

which means that is either 

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

or

parameter_list_no_posonly

and for the def(a): pass case the corresponding rule is parameter_list_no_posonly (check the rest of the specification).

Do you think that adding these explicit parentheses would help with help making this more clear?

----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39993>
_______________________________________


More information about the Python-bugs-list mailing list