I have a config file abc.ini with trivial fields
[SET_1]
a=1
b=2
c=3
[SET_2]
d=4
e=5
Now, in the script(python) I can do 2 things:
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. There will be no difference in performance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.