摘要: 类没有定义属性,自动将字典的属性作为类属性 class DictToObject: def __init__(self, dictionary): for key, value in dictionary.items(): if isinstance(value, dict): setattr(se 阅读全文
posted @ 2023-07-14 08:53 ilovetesting 阅读(2665) 评论(0) 推荐(0) 编辑