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
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com