4 ms·
This Python def a(): return False; returns None.
by JeremyBanks 15y ago
This Python
def a():
return
False;
returns None.
- qntm 15y agoThat's because in Python the line break is the statement terminator.
- JeremyBanks 15y agoPython and JavaScript both accept semicolons or line breaks to terminate statements. JavaScript's syntax problems are a bit more subtle than just that.
- riffraff 15y agoSame in ruby def foo return true end returns "nil"