3 ms·
For those not in the knowing, avoiding import side effect means never having top level code in any python module except class, functions and constant definition
by gbog 13y ago
For those not in the knowing, avoiding import side effect means never having top level code in any python module except class, functions and constant definitions, other imports and the occasional if name = main. And constants must be built-in types.