Convert string to property - AttributeError: can't set attribute

前端 未结 0 1124
刺人心
刺人心 2020-11-30 00:36

I was running python code below:

def dict2struct(d):
    res = namedtuple("config", d.keys())(*d.values())
    return res

cfg = {\'fieldx\': \'Alla         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题