all
当模块中有__all__变量,同时使用from X import *导入模块时,只能导入这个list中的元素携带的方法
all
__all__ = ['testA']
def testA():
print('this is testA')
def testB():
print('this is testB')
from my_module2 import *
testA()
this is testA
标签:__,.__,testA,testB,模块,print,import
来源: https://www.cnblogs.com/HyeJeong/p/15477080.html