Hacker News new | ask | show | jobs
by Nginx487 2155 days ago
The code encapsulated into "__main__" assumed to be module-specific, this is the purpose of that pattern. If you want to make some code available for another module, you just refactor it into separate function.