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/2012-September/121779.html below:

f() missing 1 required positional argument: 'x'

[Python-Dev] TypeError: f() missing 1 required positional argument: 'x'Terry Reedy tjreedy at udel.edu
Thu Sep 20 19:25:28 CEST 2012
On 9/20/2012 11:52 AM, Guido van Rossum wrote:

> Maybe this is also a good time to start distinguishing between
> arguments (what you pass, call syntax) and parameters (what the
> function receives, function definition syntax)?

One standard usage (and mine) is that parameters are the (local) names 
that arguments get bound to. I *believe* that Knuth used this also, but 
I cannot find a reference. Here is the CS part of
https://en.wikipedia.org/wiki/Parameters
See the last sentence.

"Computer science
Main article: Parameter (computer science)

When the terms formal parameter and actual parameter are used, they 
generally correspond with the definitions used in computer science. In 
the definition of a function such as

     f(x) = x + 2,

x is a formal parameter. When the function is used as in

     y = f(3) + 5 or just the value of f(3),

3 is the actual parameter value that is substituted for the formal 
parameter in the function definition. These concepts are discussed in a 
more precise way in functional programming and its foundational 
disciplines, lambda calculus and combinatory logic.

In computing, parameters are often called arguments, and the two words 
are used interchangeably. However, some computer languages such as C 
define argument to mean actual parameter (i.e., the value), and 
parameter to mean formal parameter."

-- 
Terry Jan Reedy

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