Skip to content

Commit

Permalink
✏ Update first-steps.md, clarify distinction between parameter and …
Browse files Browse the repository at this point in the history
…argument (fastapi#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>
  • Loading branch information
3 people authored and alexreg committed Nov 9, 2022
1 parent 9502065 commit 489098f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,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")
Expand Down

0 comments on commit 489098f

Please sign in to comment.