Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Keep your heavy runtime code and invocations behind "if __name__ == '__main__'" blocks. Alternately, if you're using a framework keep your runtime code constrained to the appropriate entry class/function. Outside of those blocks, your modules should be mostly constants, functions, and classes.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: