摘要:
Python下一切皆对象,每个对象都有多个属性(attribute),Python对属性有一套统一的管理方案。__dict__与dir()的区别: dir()是一个函数,返回的是list; __dict__是一个字典,键为属性名,值为属性值; ... 阅读全文
posted @ 2018-09-29 17:27
luoganttcc
阅读(73)
评论(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
阅读(153)
评论(0)
推荐(0)

浙公网安备 33010602011771号