[英]save all config VS access configObj for each field
I have a config file abc.ini with trivial fields 我有一个包含琐碎字段的配置文件abc.ini
[SET_1]
a=1
b=2
c=3
[SET_2]
d=4
e=5
Now, in the script(python) I can do 2 things: 现在,在脚本(python)中,我可以做两件事:
Which of these is more efficient and why.
其中哪个更有效,为什么。
A ConfigObj section actually inherits from a Python dict
, so both approaches will actually use the same underlying data structure. ConfigObj部分实际上是从python
dict
继承的,因此这两种方法实际上都将使用相同的基础数据结构。 There will be no difference in performance. 性能不会有差异。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.