[docs] [issue15990] solidify argument/parameter terminology
report at bugs.python.org
Fri Sep 21 12:08:51 CEST 2012
Ezio Melotti added the comment:
> "between arguments (what you pass, call syntax) and parameters
> (what the function receives, function definition syntax)"
Note that there's a subtle difference to make here. IMHO as soon as you use terms like "receives" or "accepts", you are still talking about arguments. What you pass from one side is received by the other, and it's called an argument.
Given "def f(x, y): pass" you can say that x and y are parameter of the f function, or that the function accepts 2 arguments -- x and y. The latter is far more common IME, and I rarely talk about parameters myself.
In "f() missing 1 required positional argument: 'x'", the usage of "argument" is correct, because what's missing is the argument in the function call, not the parameter in the function definition. However the error points to the corresponding parameter 'x' -- because clearly it can't point to the argument you forgot to pass -- and this fact might led to some confusion. IMHO though, the error is clear as is (at least regarding argument/parameter), so I wouldn't change it.
Python tracker <report at bugs.python.org>
More information about the docs