3 ms·
> Is this a new thing? I thought that was possible in Python already. Yes and no: the syntax was used in documentation (that's the "argument clinic" mentioned
by masklinn 8y ago
> Is this a new thing? I thought that was possible in Python already.
Yes and no: the syntax was used in documentation (that's the "argument clinic" mentioned in the article) and Python functions defined in C were able to define positional-only parameters, but it's a new thing for Python code: before 3.8, it's not possible to define positional-only parameters in pure Python[0], with it the "argument clinic" syntax becomes actual Python syntax (rather than pseudo-python).
[0] well you can use *args and a bunch of hand-rolled assertions