摘要: Python下一切皆对象,每个对象都有多个属性(attribute),Python对属性有一套统一的管理方案。__dict__与dir()的区别: dir()是一个函数,返回的是list; __dict__是一个字典,键为属性名,值为属性值; ... 阅读全文
posted @ 2018-09-29 17:27 luoganttcc 阅读(66) 评论(0) 推荐(0) 编辑
摘要: class Student: count=0 def __init__(self,name,age): self.name=name self.age=age Student.count+=1 ... 阅读全文
posted @ 2018-09-29 17:10 luoganttcc 阅读(143) 评论(0) 推荐(0) 编辑