python函数 系列目录:python函数——目录
0 前言
在Python开发中,经常将配置文件以json 的形式写在文件中
Bunch
可以将配置文件转换为配置类和配置字典。1
1 Bunch 教程
1.1 初始化
>>> b = Bunch()
>>> b.hello = 'world'
>>> b.hello
'world'
>>> b['hello'] += "!"
>>> b.hello
'world!'
>>> b.foo = Bunch(lol=True)
>>> b.foo.lol
True
>>> b.foo is b[</