Terry Reedy wrote: > This is not a reason for subproposal two, but a special case, as you > yourself note below, and hence does say why you want to have such. > >> def make_person(*, name, age, phone, location): >> pass
You weren't asking for a reason, you were asking for an example: this is one. > And again, why would you *make* me, the user-programmer, type > > make_person(name=namex, age=agex, phone=phonex, location = locationx) > #instead of > make_person(namex,agex,phonex,locationx) > ? Because there should be preferably only one obvious way to call that function. Readers of the code should not need to remember the order of parameters, instead, the meaning of the parameters should be obvious in the call. This is the only sane way of doing functions with many arguments. > PS. I see that Guido finally gave a (different) use case for bare * that > does make sense to me. It's actually the same use case: I don't *want* callers to pass these parameters positionally, to improve readability. 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