There are some corner cases when you would like to use the full comparison form. For example if None is used as an "no argument value was passed" flag:
deffoo(a=None):ifnota:print("No value provided")
it will print message for calls foo(), foo(0), foo(""), foo([]).
There are some corner cases when you would like to use the full comparison form. For example if None is used as an "no argument value was passed" flag:
it will print message for calls foo(), foo(0), foo(""), foo([]).
Yes, it's always best to test for the presence of
None
explicitly, rather than implicitly.