[Python-3000] PEP 3102 comments
tomer filiba
tomerfiliba at gmail.com
Wed May 24 21:26:21 CEST 2006
talin asked for comments, so
def f(a, b, *, c, d)
seems wrong to me. '*' can't be a token on its own, at least
that's the way i see it. opeators shouldn't stand for themselves.
just like the {/} (empty set) was rejected.
anyway, this pep is certainly very useful (i would have used it
countless times), and since the '*' is gonna be overloaded this
way or another, i'd vote for placing it at the end of the last
argument's name, for example:
def f(a, b*, c, d)
"a" and "b" are positional arguments, no more positional
arguments can follow "b", and "c" and "d" are keyword only
we already have *b, which reads "all positional arguments
go into b", so b* could mean "no more positional arguments
after b". it's kinda symmetric imho. i like the way it looks.
-tomer
More information about the Python-3000
mailing list