logoalt Hacker News

stavrosyesterday at 11:41 PM1 replyview on HN

What, `def main():`? Or do you mean the __name__ == "__main__" thing for distinguishing whether the code was imported?


Replies

kenstoday at 12:24 AM

I can successfully type "def main()" and not "function main()", unless I'm switching between JavaScript and Python and forget which language I'm in :-). It's the if statement with all the underscores that I need to check every time.