Edward Loper wrote:
> Martin v. Löwis wrote:
>> One reason I see is to have keyword-only functions, i.e. with no
>> positional arguments at all:
>>
>> def make_person(*, name, age, phone, location):
>>     pass
> 
> But is it necessary to syntactically *enforce* that the arguments be
> used as keywords?

This really challenges the whole point of the PEP: keyword-only
arguments (at least, it challenges the title of the PEP, although
probably not the specified rationale).

> I.e., why not just document that the arguments should
> be used as keyword arguments, and leave it at that.

Because they wouldn't be keyword-only arguments, then.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to