1. class object_example:
    2. def __init__(self) -> None:
    3. pass
    4. class person(object_example):
    5. '''there is doc'''
    6. tall = 180
    7. hobbies = []
    8. def __init__(self, name, age,weight):
    9. self.name = name
    10. self.age = age
    11. self.weight = weight
    12. def infoma(self):
    13. print('%s is %s weights %s'%(self.name,self.age,self.weight))
    14. print(person.__name__) # person
    15. print(person.__doc__) # there is doc
    16. print(person.__bases__) # (<class '__main__.object_example'>,)
    17. print(person.__dir__) # <method '__dir__' of 'object' objects>
    18. print(person.__module__) # __main__
    19. print(person.__class__) # <class 'type'>