Python中单下划线开头的特性

1.带有单下划线的特性不会被 from module import *导入。

2.单下划线是Python程序员使用类时的约定,表明程序员不希望类的用户直接访问属性。仅仅是一种约定!实际上,实例._变量,可以被访问。

参考资料:

  http://blog.csdn.net/debugm/article/details/8179482

原文地址:https://www.cnblogs.com/wangyongbin/p/4251261.html