3 ms·
Because I dislike interspersing executable statements at module level with function definitions. I’d rather have all code live inside functions and have one mai
by elteto 2y ago
Because I dislike interspersing executable statements at module level with function definitions. I’d rather have all code live inside functions and have one main entry point for the script. It’s just a personal preference, nothing wrong with not doing that though.
- jraph 2y agoBut you could have a single main() call without the if statement, couldn't you?