摘要: class C(object): """ 为了不让用户直接访问属性,让他设置为私密的,然后让property去搞 """ def __init__(self): self._x = None @property def x(self): print("property") return self._ 阅读全文
posted @ 2020-09-01 21:58 3ξ 阅读(84) 评论(0) 推荐(0) 编辑