Le mer. 15 mai 2019 à 07:37, Anders Hovmöller <[email protected]> a écrit :
> > > > On 15 May 2019, at 03:07, Robert Vanden Eynde <[email protected]> > 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). >
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
