attribute and private attribute difference in Python property?

前端 未结 0 843
感情败类
感情败类 2021-02-20 09:45
class test:
def __init__(self):
    self.abc = 123
@property
def abc(self):
    return self._abc

@abc.setter
def abc(self, value):
    self._abc = value

@abc.deleter
d         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题