文件一: imptee.py
foo = 'abc'
def show():
print ('foo from imptee:',foo)
show()
文件二:test.py
from imptee import foo,show
show()
foo = 123
print ('foo from impter: '+str(foo))
show()
运行结果:
foo from imptee: abc
foo from imptee: abc
foo from impter: 123
foo from imptee: abc
为什么会运行一次imptee.py里的加粗的show()函数?
版本3.2