stackoverflow 上关于 What will happen if two modules import each other? 的讨论
https://stackoverflow.com/questions/744373/circular-or-cyclic-imports-in-python
这一段没看懂,哪个是哪个看晕了:
Finally, the executing script runs in a module named __main__, importing the script under its own name will create a new module unrelated to __main__.
例子
# first.py
from second import b
def a():
print('This is a')
# second.py
from first import a
def b():
print('This is b')
执行 second.py