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

Steven D'Aprano steve at pearwood.info
Sun Mar 4 23:32:10 CET 2012


Guido van Rossum wrote:
> On Sun, Mar 4, 2012 at 9:20 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
>> If I understand correctly, there is no way to have positional-only,
>> position-or-keyword, and keyword-only in the same signature?
> 
> Heh. If that's true, my '/' proposal wins:
> 
> def foo(pos_only, /, pos_or_kw, *, kw_only): ...
> 
> Defaults can be added to taste.

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.

If we have to have this feature, +1 on this syntax.

I'm still only +0 on the feature itself.



-- 
Steven




More information about the Python-ideas mailing list