[issue16319] optional comma inside function argument list triggers syntax error

Chris Jerdonek report at bugs.python.org
Thu Oct 25 09:46:01 CEST 2012


Chris Jerdonek added the comment:

I could be misinterpreting the documentation, but it looks to me like the examples given are behaving as documented:

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

(from                     http://docs.python.org/dev/reference/compound_stmts.html#function-definitions )

The relevant clause in the above looks to be the following, which can't give rise to a trailing comma:

"*" [parameter] ("," defparameter)* [, "**" parameter]

----------
nosy: +chris.jerdonek

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16319>
_______________________________________


More information about the Python-bugs-list mailing list