✏ Update first-steps.md
, clarify distinction between parameter and argument (#176)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
a1f3708dbb
commit
aac4ce175c
1 changed files with 2 additions and 2 deletions
|
@ -432,14 +432,14 @@ are called "Python function parameters" or "Python function arguments".
|
|||
|
||||
It's quite technical... and somewhat pedantic.
|
||||
|
||||
One refers to the variable name in a function *declaration*. Like:
|
||||
*Parameter* refers to the variable name in a function *declaration*. Like:
|
||||
|
||||
```
|
||||
def bring_person(name: str, lastname: str = ""):
|
||||
pass
|
||||
```
|
||||
|
||||
The other refers to the value passed when *calling* a function. Like:
|
||||
*Argument* refers to the value passed when *calling* a function. Like:
|
||||
|
||||
```
|
||||
person = bring_person("Camila", lastname="Gutiérrez")
|
||||
|
|
Loading…
Reference in a new issue