Open wangjianweiwei opened 4 years ago
__doc__
红框里的就是doc方法的值
__dict__
对象的属性都在dict里
class A: def __init__(self, name, age): self.name = name self.age = age if __name__ == '__main__': a = A(name="toy", age=30) print(a.__dict__) # {'name': 'toy', 'age': 30}
__slots__
__module__
__annotations__
__init__
__new__
__hash__
__len__
__eq__
__ne__
__str__
__repr__
__format__
__getattribute__
__delattr__
__sizeof__
__reduce__
__reduce_ex__
__dir__
__get__
__set__
__del__
__getattr__
__setattr__
__getitem__
__setitem__
__delitem__
__enter__
__exit__
__next__
__iter__
__doc__
红框里的就是doc方法的值
__dict__
对象的属性都在dict里
__slots__
__module__
__annotations__
__init__
__new__
__hash__
__len__
__eq__
__ne__
__str__
__repr__
__format__
__getattribute__
__delattr__
__sizeof__
__reduce__
__reduce_ex__
__dir__
__get__
__set__
__del__
__getattr__
__setattr__
__delattr__
__getitem__
__setitem__
__delitem__
__enter__
__exit__
__next__
__iter__