Is it pointless to have the lines:
else: return x #where x is any result
to end a function? Is there any difference since everything that would reach
return x would fall under an implied “
else” anyway, right?
def isPositiveNumber(n): if n > 0: return True else: return False
def isPositiveNumber(n): if n > 0: return True return False
P.S. (Not the original idea, but I just realized that this might work with anything–not just return–so the title is a misnomer. Sorry.)