mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-11-22 11:04:25 +01:00
Merge pull request #160 from vrthra/patch-1
Make sure that default_arg is not passed rather than checking for fal…
This commit is contained in:
commit
183e0d9ee5
2
README.md
vendored
2
README.md
vendored
@ -2173,7 +2173,7 @@ def some_func(default_arg=[]):
|
|||||||
|
|
||||||
```py
|
```py
|
||||||
def some_func(default_arg=None):
|
def some_func(default_arg=None):
|
||||||
if not default_arg:
|
if default_arg is not None:
|
||||||
default_arg = []
|
default_arg = []
|
||||||
default_arg.append("some_string")
|
default_arg.append("some_string")
|
||||||
return default_arg
|
return default_arg
|
||||||
|
Loading…
Reference in New Issue
Block a user