b = 5
Then this code works fine:
if b > 2: return False else: return True
but this doesn’t:
return False if b > 2 else return True
I thought these 2 were functionally equivalent to each other, but I get told ‘this code is unreachable’ about ‘return True’ in the inline version. Not sure why it would be unreachable, so these 2 ways of formatting if/else must be different. Why is that?