Jim Jewett wrote:
> I also see the value of keyword-only arguments without unlimited
> positional arguments. Whether it deserves syntax and what that syntax
> should be (such as * or *None) may need a pronouncement eventually,
> but it doesn't have to be complex.
My previous post was just wild brainstorming. I'd be
perfectly happy with
def f(a, b, *, c, d = x):
# c and d are keyword only, c is required,
# no extra positional args allowed
I don't buy the argument that bare * should mean "extra
positional args ignored", since there's already a way of
saying that:
def f(a, b, *others):
# and then don't bother doing anything with others
As shown above, I don't see any extra difficulty there.
--
Greg
_______________________________________________
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