时间:2021-07-01 10:21:17 帮助过:109人阅读
def ReadOnlyObject(**args):
dictBI = {}
args_n = []
for name, val in args.items():
dictBI[name] = val
args_n.append(name)
dictBI['__slots__'] = args_n
return type('ReadOnlyObject', (object,), dictBI)()