I wonder if it is bad manner to skip return None
, when it is not needed.
Example:
def foo1(x):
if [some condition]:
return Baz(x)
else:
return None
def foo2(x):
if [some condition]:
return Baz(x)
bar1 = foo1(x)
bar2 = foo2(x)
In both cases, when condition is false, function will return with None
.