Comment on Ask YC: Best practice for Python module imports?Comments−csytan17yOne reason to import something within a function would be for lazy loading. If I do end up having many different imports, I tend to group them by library/framework.I've learned a lot by looking at the source code for guido's rietveld: http://code.google.com/p/rietveld/source/browse/trunk/codere...
Comments
One reason to import something within a function would be for lazy loading. If I do end up having many different imports, I tend to group them by library/framework.
I've learned a lot by looking at the source code for guido's rietveld: http://code.google.com/p/rietveld/source/browse/trunk/codere...