Today I've learned that in Python arguments and parameters are different things. I used to use these terms interchangeably.

In short: parameters are the names that you use in the function definition, and arguments are the values that you pass to the function when you call it.

So, turns out, arguments do not always become exact values of function parameters — namely, when you use var-positional and var-keyword parameters (?) According to the python.org's example,

def func(**kwargs):
pass

func(foo='bar')

here the argument is 'bar', but the parameter is kwargs. During the call, the parameter's value is {'foo': 'bar'}.

#python

Programming FAQ

Contents: Programming FAQ- General Questions- Is there a source code level debugger with breakpoints, single-stepping, etc.?, Are there tools to help find bugs or perform static analysis?, How can ...

Python documentation