Is it a bad practice to do this:
In first.py:
import second
import mymodule
In second.py:
import mymodule
mymodule
is being imported in both files and first.py imports second.py. Is it possible to somehow import the mymodule
just once? It's not a big deal, it's just not elegant nor Pythonic IMO.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…