Skip to content

Commit 97954d7

Browse files
authored
Merge pull request xianhu#23 from rydesun/patch-1
Update python_base.py
2 parents e01d423 + 8788f0a commit 97954d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,8 @@ def add(x,y):return x + y
763763
"""
764764

765765
#-- 包相对导入:使用点号(.) 只能使用from语句
766-
from . import spam # 导入当前目录下的spam模块(错误: 当前目录下的模块, 直接导入即可)
767-
from .spam import name # 导入当前目录下的spam模块的name属性(错误: 当前目录下的模块, 直接导入即可,不用加.)
766+
from . import spam # 导入当前目录下的spam模块(Python2: 当前目录下的模块, 直接导入即可)
767+
from .spam import name # 导入当前目录下的spam模块的name属性(Python2: 当前目录下的模块, 直接导入即可,不用加.)
768768
from .. import spam # 导入当前目录的父目录下的spam模块
769769

770770
#-- 包相对导入与普通导入的区别

0 commit comments

Comments
 (0)