[Python-3000] PEP3102 Keyword-Only Arguments (original) (raw)
Jim Jewett jimjjewett at gmail.com
Sun Aug 13 05:56:15 CEST 2006
- Previous message: [Python-3000] PEP3102 Keyword-Only Arguments
- Next message: [Python-3000] PEP3102 Keyword-Only Arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-3000] PEP3102 Keyword-Only Arguments
- Next message: [Python-3000] PEP3102 Keyword-Only Arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]