Alex Martelli wrote: >> def foo(a, b, *, x=1, y=2): ... > > So, what will this syntax signify?
This particular example means "a and b are required positional arguments, no other positional arguments are allowed, and x and y are optional keyword-only arguments". > If the single-star stands for > "arbitrary positional arguments", how will the body of foo access > them? To allow extra positional args, you would need a name after the *, same as now. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com