A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/064777.html below:

[Python-Dev] PEP 3102: Keyword-only arguments

[Python-Dev] PEP 3102: Keyword-only argumentsGreg Ewing greg.ewing at canterbury.ac.nz
Tue May 2 13:07:33 CEST 2006
Terry Reedy wrote:

> my way to call your example (given the data in separate variables):
>   make_person(name, age, phone, location)
> your way:
>   make_person(name=name, age=age, phone=phone, location = location)

For situations like that, I've sometimes thought
it would be useful to be able to say something like

   make_person(=name, =age, =phone, =location)

> It is a feature of Python that arguments can usually be matched to 
> parameters either by position or name, as the *caller* chooses.

Except that the caller doesn't always get that option
even now, if the callee has chosen to use *args or **kwds.
So I wouldn't consider that a very strong argument.

> And they need not; it is right there in front of them.  As for writers, 
> modern IDEs should try to list the parameter signature upon typing 'func('.

Which is extremely difficult for an IDE to do without
static type information.

--
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4