Re:Say “no” to import side‐effects in Python
by grey413 on Saturday April 05, 2014 @10:09AM
(#7537109)
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.
[ Parent
| on HN ]
There are no comments on this comment yet.