예제 #1
0
 def as_dict(self):
     config = {}
     for name in self.PUBLIC_ATTRIBUTES:
         attr = getattr(self, name)
         config[name] = to_dict(attr)
     return config
예제 #2
0
 def as_dict(self):
     return {name: to_dict(getattr(self, name)) for name in self.__slots__}
예제 #3
0
 def as_dict(self):
     config = {}
     for name in self.PUBLIC_ATTRIBUTES:
         attr = getattr(self, name)
         config[name] = to_dict(attr)
     return config
예제 #4
0
 def as_dict(self):
     return {
         name: to_dict(getattr(self, name))
         for name in self.__slots__
     }