4 ms·
If your import statements are indented, they must be in control statements (try/except or conditional imports, I fail to see why you would put those in a loop)
by makapuf 4y ago
If your import statements are indented, they must be in control statements (try/except or conditional imports, I fail to see why you would put those in a loop) thus they will be difficult to reorder if you import another module (with different name or stdlib status) on import error.
- drcongo 4y agoI'm not sure what you mean here, but package names can be indented without conditionals or tries, as in... from application.module.modules import ( Model1, Model2, Model3, Model4, Model5, Model6 ) iSort handles this fine if you're using spaces for indentation.