码迷,mamicode.com
首页 > 其他好文 > 详细

模块中的__all__的作用

时间:2019-07-04 17:17:10      阅读:89      评论:0      收藏:0      [点我收藏+]

标签:from   作用   pre   mic   import   inf   http   nbsp   img   

__all__ = ["Test", "test1"]  #__all__  表示from  import *,这个__all__ 等价与这个*


class Test():
    def test(self):
        print("=====Test=====")


def test1():
    print("====test1=====")


def test2():
    print("====test2=====")

  

技术图片

 


 

模块中的__all__的作用

标签:from   作用   pre   mic   import   inf   http   nbsp   img   

原文地址:https://www.cnblogs.com/miyatest/p/11133397.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!