求解大神,为啥我用dir(p)没任何显示呀
class Person(object): def __init__(self, name, gender, **kw): self.name = name self.gender = gender for k,i in kw.iteritems(): print k,i self.k = i p = Person('Bob', 'Male', age=18, course='Python') dir(p) #print p.age #print p.course