HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by JeremyBanks | Hacker News Reader
Parent
Full thread
JeremyBanks
·
This Python
def a(): return False;
returns
None
.
View on HN
qntm
·
That's because in Python the line break is the statement terminator.
JeremyBanks
·
Python and JavaScript both accept semicolons or line breaks to terminate statements. JavaScript's syntax problems are a bit more subtle than just that.
riffraff
·
Same in ruby
def foo return true end
returns "nil"
Reply on news.ycombinator.com