*args and **kwargs

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Sep 2 21:32:57 EDT 2016


Ben Finney wrote:
> in the definition of the function, parameters are neither positional nor
> keyword.

In Python 3 that's not quite true -- it's possible
to define "keyword only" parameters that can't be
passed positionally.

However, it's true that any of the "ordinary" parameters
(ones that aren't keyword-only) can be specified either
positionally or by keyword in a call.

-- 
Greg



More information about the Python-list mailing list