the module level, then the import has to precede the use:
import x
class cls(x.cls1):
pass
Other than that I don't know of any reasons (other than readability, which
can be interpreted to advantage either way).
-- Rob --
"Hallvard B Furuseth" (nospam).no> wrote in
message news:HBF.20030828usgy at bombur.uio.no...
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
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