Q: import statement within a function
lisowski.tomasz at sssa.NOSPAM.com.pl
Fri Feb 2 08:17:03 CET 2001
This is perhaps rather a basic question, but ...
I have seen often import statements included within a function's body, not
in the global scope, as it is most common.
as compared to:
What are the advantages of the first approach over the second. Won't Python
do the importing job many times, each time the function fun() is called?
More information about the Python-list