According to the Python Coding Guidelines you should always put the
imports at the top of a file simply because it makes the file more
readable. Performance-wise there are AFAIK some small
speed-ramifications (negative ones) when putting imports into a
function instead of having them at the module
7timesTom wrote:
> I have a large number of view functions which require various python,
> django and other import statements.
>
> My question is: is it ok to put ALL my import statements at the top of
> views.py and then not have to worry about which view fuction uses
> what. Or must I put my imp
I have a large number of view functions which require various python,
django and other import statements.
My question is: is it ok to put ALL my import statements at the top of
views.py and then not have to worry about which view fuction uses
what. Or must I put my imports within the view fuction
3 matches
Mail list logo