Python之property的使用

属性property 1. 私有属性添加getter和setter方法 class Money(object): def __init__(self): self.__money=100 def setMoney(self,value): if isinstance(value,int): self.__money=valu
相关文章
相关标签/搜索