📜  如何在python代码示例中声明私有属性

📅  最后修改于: 2022-03-11 14:45:33.700000             🧑  作者: Mango

代码示例1
class Base:
    def __init__(self):
        self.__private_attribute = 2 #two underscores before attribute declare it as private