摘要: class family(object): family = 'this is a family of three' def __init__(self,mother,father): self.mother = mother self.father = father def menber_name 阅读全文
posted @ 2020-03-30 22:02 无聊就看书 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 一.类的静态属性 即是将类的函数属性,封装成类似数据属性。比如:类方法函数的返回值获取。通过:@proporty class Who(object): what = 'what' # brother = 'jack' def __init__(self,name,age,gender): self. 阅读全文
posted @ 2020-03-30 01:42 无聊就看书 阅读(369) 评论(0) 推荐(0) 编辑