在Python中使用_或 __开头的方法名称,表示方法对类是“私有的”,而不是由外部程序使用的。
_
__
例如
class Test: def __init__(self): pass def __privateMethod(self): pass
Python:类中的私有方法
原文:https://www.cnblogs.com/moyutime/p/14351386.html