Gigs_ wrote:
> I read that this is not the same:
> def functionF(argString="abc", argList = None):
>         if argList is None: argList = []      # < this
>         ...
> def functionF(argString="abc", argList=None):
>         argList = argList or []               # and this
>         ...
> 
> Why?

If argList is a false value besides None ("", [], {}, False, etc.), the 
second example will replace it with an empty list.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to