Le mer. 15 mai 2019 à 07:37, Anders Hovmöller <boxed@killingar.net> a écrit :


> On 15 May 2019, at 03:07, Robert Vanden Eynde <robertve92@gmail.com> wrote:
>
> Currently if one wants to provide positional arguments after keyword arguments, it's not possible, one must begin with positional arguments [1] or use keyword arguments [2] :


 In my opinion the goal should be that there is no such thing as positional only arguments in python. It's just a bad idea. No r al arguments that can be both positional or keyword at the call site, or keyword only. Those are good and make sense. Adding a third option is just added complexity.

But what if on the call side the user wants to specify y before x but the definition side wanted "positional only args" for performance reason ?

On another note, there's no way to specify "positional only arguments" in "pure python" using a syntax used in the documentation like "def f(x, y, /)" (but def f(*args) will do the trick).