摘要:
class pers(): def __init__(self,hp): self._hp=hp @property def hp(self): return self._hp @hp.setter def hp(self,hp): self._hp=gp if hp>=0 else 0 a=per 阅读全文
摘要:
class test(): aaa = 111 bbb = 222 ccc = 333 @classmethod def cm(cls): cls.aaa="***" def im(self): self.aaa="iii" aa = test() print(aa.aaa,aa.bbb,aa.cc 阅读全文