python字典转对象

class DictToStruct:
    def __init__(self, **entries):
        self.__dict__.update(entries)
struct = DictToStruct(**temp)

当前文章:python字典转对象
转载来源:http://www.dvlbo.com/article/ppiico.html