[Python-Dev] Positional-only parameters in Python

Oleg Broytman phd at phdru.name
Wed Jan 17 11:44:21 EST 2018


On Wed, Jan 17, 2018 at 08:29:16AM -0800, Ethan Furman <ethan at stoneleaf.us> wrote:
>    def some_func(a, b, /, this, that, *, the_other):
>        # some stuff
> 
> Everything before the slash is positional-only, between the slash and star
> is positional-or-keyword, and after the star is keyword-only.

   Is there syntax to combine

def some_func(a, b, /, *, the_other):

   ??? May be

def some_func(a, b, /*, the_other):

   ???

> And slash is
> certainly no uglier than star.  ;)

   I tend to agree. Both are absolutely but equally ugly. :-(

> --
> ~Ethan~

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-Dev mailing list