class A: def __init__(self): self.a = 'aa' self.b = 'bb' a = A() a.__dict__ -> {'a': 'aa', 'b': 'bb'}
Recommended Posts