L
Lowell Kirsh
On a webpage (see link below) I read that the following 2 forms are not
the same and that the second should be avoided. They look the same to
me. What's the difference?
Lowell
----
def functionF(argString="abc", argList = None):
if argList is None: argList = []
...
def functionF(argString="abc", argList=None):
argList = argList or []
...
http://www.ferg.org/projects/python_gotchas.html (number 5)
the same and that the second should be avoided. They look the same to
me. What's the difference?
Lowell
----
def functionF(argString="abc", argList = None):
if argList is None: argList = []
...
def functionF(argString="abc", argList=None):
argList = argList or []
...
http://www.ferg.org/projects/python_gotchas.html (number 5)