python attrdict模块

能够像给类对象赋值一样修改dict对应key的value

1
2
3
4
5
6
> from attrdict import AttrDict
> a = AttrDict({<!-- -->'foo': 'bar'})
> a.foo
'bar'
> a['foo']
'bar'

文档:https://pypi.org/project/attrdict/