最好的方法是: class AttrDict(dict): def __init__(self, *args, **kwargs): super(AttrDict, ... 所有python对象在内部将其属性存储在名为的字典中 __dict__ 。
確定! 回上一頁