Python konvertieren Objekt in DITCT

class A():
  def __init__(self):
    self.a = 1
    self.b = 2
    
a = A()
aDict = vars(a)
Plain Pintail