Python calls them keyword arguments.
They do, but they're also not strictly required to be named explicitly:
They can be:
>>> def foo(bar=None): ... print(bar) ... >>> foo() None >>> foo(bar="baz") baz >>> foo(bar="baz", baz="azp") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: foo() got an unexpected keyword argument 'baz'
>>> def bar(**kwargs): ... print(kwargs) ... >>> bar() {} >>> bar(site="HN", user="tonyarkles") {'site': 'HN', 'user': 'tonyarkles'}
And I suppose Lisp started that with :key args
Python’s perversity is fractal.
They do, but they're also not strictly required to be named explicitly:
They can be:
But you can also use them generically: