📜  python 将对象转换为 ditct - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:47.684000             🧑  作者: Mango

代码示例1
class A():
  def __init__(self):
    self.a = 1
    self.b = 2
    
a = A()
aDict = vars(a)