5 ms·
if __name__ == "__main__" { print_message(10); } This just looks wrong without parenthesis around the conditional statement.
by finger 3y ago
if __name__ == "__main__" {
print_message(10);
}
This just looks wrong without parenthesis around the conditional statement.
- dvh 3y agoIn pascal you can call function that has no arguments without parentheses: writeln; if x = 5 then writeln;
- kova12 3y agoIt does, doesn't it? I wish there was some sort of compat layer which would allow to natively use python libraries in Javascript
- dartos 3y agohttps://github.com/extremeheat/JSPyBridge https://github.com/extremeheat/JSPyBridge Happy hacking!
- ComputerGuru 3y agoWelcome to rust!
- apetrovic 3y agoHuh? Rust, Go, Swift and probably many more languages does the same.
- paulcole 3y agoI’ve got a side project called Parenthon that I’m going to release soon. Let me know if you want in on the beta!
- ufo 3y agoThe purpose of parenthesis is too let the language know when the condition ends, and the statement begins. In a language with mandatory curly braces, the brace does that job already.