imports after function definitions?

Hallvard B Furuseth (nospam nospam) h.b.furuseth at usit.uio.no
Thu Aug 28 14:25:11 EDT 2003


Is there any reason not to structure my program like this?

   def ...
   def ...
   var = ...
   var = ...
   import ...
   import ...
   main_function()

E.g. does it compile to slower code, or does it confuse PyChecker or
something, if I put the imports after the functions that use them?

-- 
Hallvard




More information about the Python-list mailing list