[Python-ideas] keyword arguments everywhere (stdlib) - issue8706

Ethan Furman ethan at stoneleaf.us
Mon Mar 5 23:23:16 CET 2012

Greg Ewing wrote:
> Steven D'Aprano wrote:
>> Now that I understand that / will only appear in at most one place, 
>> like * (and not following each and every positional-only arg) this is 
>> the nicest syntax I've seen yet.
> It's reasonably nice, but I'm not sure about giving the '/' its
> own slot with commas either side. This works for * and ** because
> they (optionally now in the case of *) take a name after them,
> but the '/' never will.
> So how about treating '/' as a separator instead:
>   def foo(pos1, pos2 / arg3, arg4, *args, **kwds):

Looks a lot like division to me.  Plus you then have the signature 
different from the call (as it *would* be division if you tried to use 
it as a separator when calling it).

Unless we have a good reason to treat it differently from a lone '*', I 
think we should be consistent and treat it the same.  (I obviously don't 
think the lack of a name is a good enough reason to be inconsistent. ;)


More information about the Python-ideas mailing list