mirror of
https://github.com/satwikkansal/wtfpython
synced 2025-07-04 04:18:00 +02:00
Fix typo
This commit is contained in:
parent
424b240acc
commit
8cf1148a41
1 changed files with 1 additions and 1 deletions
2
README.md
vendored
2
README.md
vendored
|
@ -804,7 +804,7 @@ def some_func(default_arg=[]):
|
||||||
(['some_string', 'some_string'],)
|
(['some_string', 'some_string'],)
|
||||||
```
|
```
|
||||||
|
|
||||||
- A common practice to avoid bugs due to mutable arguments is to assign `None` as the default value and later check if any value is passed to the function corresponding to that argument. Examlple:
|
- A common practice to avoid bugs due to mutable arguments is to assign `None` as the default value and later check if any value is passed to the function corresponding to that argument. Example:
|
||||||
|
|
||||||
```py
|
```py
|
||||||
def some_func(default_arg=None):
|
def some_func(default_arg=None):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue