Kaydet (Commit) e1938069 authored tarafından Fred Drake's avatar Fred Drake

clarify trailing comma in function argument list

(SF bug #798652)
üst 687ed47d
......@@ -444,8 +444,8 @@ series of arguments:
{\token{identifier} "=" \token{expression}}
\end{productionlist}
A trailing comma may be present after an argument list but does not
affect the semantics.
A trailing comma may be present after the positional and keyword
arguments but does not affect the semantics.
The primary must evaluate to a callable object (user-defined
functions, built-in functions, methods of built-in objects, class
......
......@@ -318,10 +318,10 @@ section~\ref{types}):
{"def" \token{funcname} "(" [\token{parameter_list}] ")"
":" \token{suite}}
\production{parameter_list}
{(\token{defparameter} ",")*}
\productioncont{("*" \token{identifier} [, "**" \token{identifier}]}
\productioncont{| "**" \token{identifier}
| \token{defparameter} [","])}
{(\token{defparameter} ",")*}
\productioncont{(~~"*" \token{identifier} [, "**" \token{identifier}]}
\productioncont{ | "**" \token{identifier}}
\productioncont{ | \token{defparameter} [","] )}
\production{defparameter}
{\token{parameter} ["=" \token{expression}]}
\production{sublist}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment