文件结构

文件内容
testa.py:
def fn():
print("a")
testb.py:
from ..a.testa import fn
fn()
print("b")
运行命令:
python -m tmp.b.testb
输出:
tmp init
b init
a init
a
b
文件结构

文件内容
testa.py:
def fn():
print("a")
testb.py:
from ..a.testa import fn
fn()
print("b")
运行命令:
python -m tmp.b.testb
输出:
tmp init
b init
a init
a
b
775
1349
420
446

被折叠的 条评论
为什么被折叠?
