代码中使用的类
>>> from person import Person
>>> bob = Person('Bob Smith')>>> print(bob)
[Persion:Bob Smith,0]
>>> bob.__class__
<class 'person.Person'>
>>> bob.__class__.__name__
'Person'
>>> list(bob.__dict__.keys())
['name', 'job', 'pay']
>>> for key in bob.__dict__:
print(key,"=>",getattr(bob,key))
name => Bob Smith
job => None
pay => 0