Commit e554cc85 authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Changed according to review.

parent 8e0dc6cd
...@@ -220,14 +220,13 @@ listed after a ``"*"`` parameter and before a ``"**"`` parameter if any:: ...@@ -220,14 +220,13 @@ listed after a ``"*"`` parameter and before a ``"**"`` parameter if any::
# We cannot call f with less verbosity than this. # We cannot call f with less verbosity than this.
foo = f(4, "bar", c=68, e=1.0) foo = f(4, "bar", c=68, e=1.0)
* As shown above, the ``c``, ``d`` and ``e`` arguments can not be As shown above, the ``c``, ``d`` and ``e`` arguments can not be
passed as positional arguments and must be passed as keyword arguments. passed as positional arguments and must be passed as keyword arguments.
Furthermore, ``c`` and ``e`` are **required** keyword arguments
since they do not have a default value.
* Furthermore, ``c`` and ``e`` are required keyword arguments A single ``"*"`` without argument name can be used to
since they do not have a default value. terminate the list of positional arguments::
If the parameter name after the ``"*"`` is omitted, the function will
not accept any extra positional arguments::
def g(a, b, *, c, d): def g(a, b, *, c, d):
... ...
......
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