File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1215,19 +1215,25 @@ e.g.::
12151215 return penguin
12161216
12171217.. index ::
1218+ single: / (slash); function definition
12181219 single: * (asterisk); function definition
12191220 single: **; function definition
12201221
12211222Function call semantics are described in more detail in section :ref: `calls `. A
12221223function call always assigns values to all parameters mentioned in the parameter
1223- list, either from position arguments, from keyword arguments, or from default
1224+ list, either from positional arguments, from keyword arguments, or from default
12241225values. If the form "``*identifier ``" is present, it is initialized to a tuple
12251226receiving any excess positional parameters, defaulting to the empty tuple.
12261227If the form "``**identifier ``" is present, it is initialized to a new
12271228ordered mapping receiving any excess keyword arguments, defaulting to a
12281229new empty mapping of the same type. Parameters after "``* ``" or
12291230"``*identifier ``" are keyword-only parameters and may only be passed
1230- used keyword arguments.
1231+ by keyword arguments. Parameters before "``/ ``" are positional-only parameters
1232+ and may only be passed by positional arguments.
1233+
1234+ .. versionchanged :: 3.8
1235+ The ``/ `` function parameter syntax may be used to indicate positional-only
1236+ parameters. See :pep: `570 ` for details.
12311237
12321238.. index ::
12331239 pair: function; annotations
You can’t perform that action at this time.
0 commit comments