python字典转对象

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

分享名称:python字典转对象
文章网址:http://www.jxruijie.cn/article/ppiico.html