Skip to content

Commit 00389f3

Browse files
committed
Update about.md
1 parent b7ae4dc commit 00389f3

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

concepts/function-arguments/about.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,20 @@ TypeError: concat() got some positional-only arguments passed as keyword argumen
7171

7272
## Keyword Arguments
7373

74-
Keyword arguments are for parameters defined with a [default argument][default arguments].
75-
Keyword arguments can optionally be passed by their position.
74+
Keyword arguments use the parameter name when calling a function.
75+
Keyword arguments can optionally be referred to by position.
7676

77-
Following is an example of keyword arguments being passed by their keyword and by position:
77+
Following is an example of keyword arguments being referred to by their parameter name and by position:
7878

7979
```python
80-
>>> def concat(greeting="Hello, ", name="you"):
80+
>>> def concat(greeting, name):
8181
... return f"{greeting}{name}"
8282
...
83+
# Function call using parameter names as argument keywords.
8384
>>> print(concat(name="Bob", greeting="Hello, "))
8485
Hello, Bob
86+
...
87+
# Function call with positional data as arguments.
8588
>>> print(concat("Hello, ", "Bob"))
8689
Hello, Bob
8790
>>> print(concat())

0 commit comments

Comments
 (0)