对象包含的内置方法 class MyObj(object): def __init__(self): self.value = 0 myObj = MyObj() print(dir(myObj)) 返回结果 ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__ini