请参考https://blog.csdn.net/u013205877/article/details/77427785
class test:
_name = "hello"
__name = "world"
print (test._name)
print (test.__name)
运行结果如下:
hello
Traceback (most recent call last):
File "test_python_下划线.py", line 6, in <module>
print (test.__name)
AttributeError: type object 'test' has no attribute '__name'