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

__all__ 作用, 相当于导入*

时间:2016-10-25 02:29:50      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:ring   imp   string   导入   details   参考   detail   log   mod   

它是一个string元素组成的list变量,定义了当你使用 from <module> import * 导入某个模块的时候能导出的符号(这里代表变量,函数,类等)

 

 

 

参考文章:

http://python-china.org/t/725

http://blog.csdn.net/orangleliu/article/details/49848413

 

__all__ 作用, 相当于导入*

标签:ring   imp   string   导入   details   参考   detail   log   mod   

原文地址:http://www.cnblogs.com/qingyuanjushi/p/5995152.html

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