[Python-3000] PEP3102 Keyword-Only Arguments

Jim Jewett jimjjewett at gmail.com
Sun Aug 13 05:56:15 CEST 2006


On 8/11/06, Jiwon Seo <seojiwon at gmail.com> wrote:
> When we have keyword-only arguments, do we allow 'keyword dictionary'
> argument? If that's the case, where would we want to place
> keyword-only arguments?

> Are we going to allow any of followings?

> 1. def foo(a, b,  *, key1=None, key2=None, **map)

Seems perfectly reasonable.

I think the controversy was over whether or not to allow keyword-only
without a default.

> 2. def foo(a, b, *,  **map, key1=None, key2=None)

Seems backward, though I suppose we could adjust if we needed to.

> 3. def foo(a, b, *, **map)

What would the * even mean, since there aren't any named keywords to separate?

-jJ


More information about the Python-3000 mailing list