I have noticed many times that the mod mod import statement can be placed tightly before calling mod.something (). Although I noticed that usually developers put an import statement at the beginning of the source file. Is there a good reason for this?
I often use only a few functions from a certain module in a specific place. It seems prettier to me to explicitly position the import statement before calling the function.
eg.
import mod
mod.something()
What would you recommend and why?
xralf source
share