Python needs an actual default function
Fushuan [he/him] @ fushuan @lemm.ee Posts 2Comments 1,238Joined 2 yr. ago
Fushuan [he/him] @ fushuan @lemm.ee
Posts
2
Comments
1,238
Joined
2 yr. ago
Locked
Lemmy needs more donations
Deleted
Permanently Deleted
Deleted
Permanently Deleted
Locked Removed
Cocaine "no worse than whiskey," would be "sold like wine" if legalized worldwide, Colombia's president says
I'm gonna repeat what I wrote in another comment. You are comparing the default interpreted way of running python
gto a compiled language. When you compile a python program into a wheel, you define the entry points of the code on it, and they point to functions like main() or whatever you define.You aren't complaining that a index.js doesn't automatically run the main function when run by node, or that bash doesn't also have a default main function execution. Interpreted languages oriented to scripting won't have the same rules as compiled languages.
programming languages aren't usually cursed, what's cursed is the way some people decide to structure their programs. I've seen some stuff.