@@ -1215,19 +1215,25 @@ e.g.::
|
1215 | 1215 | return penguin |
1216 | 1216 | |
1217 | 1217 | .. index:: |
| 1218 | + single: / (slash); function definition |
1218 | 1219 | single: * (asterisk); function definition |
1219 | 1220 | single: **; function definition |
1220 | 1221 | |
1221 | 1222 | Function call semantics are described in more detail in section :ref:`calls`. A |
1222 | 1223 | function 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 |
1224 | 1225 | values. If the form "``*identifier``" is present, it is initialized to a tuple |
1225 | 1226 | receiving any excess positional parameters, defaulting to the empty tuple. |
1226 | 1227 | If the form "``**identifier``" is present, it is initialized to a new |
1227 | 1228 | ordered mapping receiving any excess keyword arguments, defaulting to a |
1228 | 1229 | new empty mapping of the same type. Parameters after "``*``" or |
1229 | 1230 | "``*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. |
1231 | 1237 | |
1232 | 1238 | .. index:: |
1233 | 1239 | pair: function; annotations |
|