[Python-ideas] keyword arguments everywhere (stdlib) - issue8706
fuzzyman at gmail.com
Sun Mar 4 23:44:15 CET 2012
On 4 March 2012 22:32, Steven D'Aprano <steve at pearwood.info> wrote:
> 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.
Agreed. However I've *never* wanted to create a "positional args only"
parameter to an api that wasn't covered by *args. I also think that in
*general* allowing keyword args is an improvement to APIs.
So I guess I'm -0 on the feature, but the "/" syntax seems the best of the
ones suggested so far.
> I'm still only +0 on the feature itself.
> Python-ideas mailing list
> Python-ideas at python.org
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas