python查看源码的时候__all__的作用

__all__ = ["fun1", "fun2"]


def fun1():
    print(111)


def fun2():
    print(2222)


def fun3():
    print(3333)


if __name__ == '__main__':
    pass

test1.py

python查看源码的时候__all__的作用

 如果定义了__all__ = [fffffff]   在其他py导入*的时候只导入all列表中的