回答編集履歴
1
追記
answer
CHANGED
@@ -11,4 +11,15 @@
|
|
11
11
|
[https://docs.python.org/ja/3/library/configparser.html#id14](https://docs.python.org/ja/3/library/configparser.html#id14)
|
12
12
|
[https://docs.python.org/ja/3/library/configparser.html#customizing-parser-behaviour](https://docs.python.org/ja/3/library/configparser.html#customizing-parser-behaviour)
|
13
13
|
|
14
|
+
[https://docs.python.org/ja/3/library/configparser.html#configparser.ConfigParser.optionxform](https://docs.python.org/ja/3/library/configparser.html#configparser.ConfigParser.optionxform)
|
15
|
+
|
16
|
+
```plain
|
17
|
+
>>> custom.optionxform = lambda option: option
|
18
|
+
>>> custom.read_string(config)
|
19
|
+
>>> list(custom['Section1'].keys())
|
20
|
+
['Key']
|
21
|
+
>>> list(custom['Section2'].keys())
|
22
|
+
['AnotherKey']
|
23
|
+
```
|
24
|
+
|
14
25
|
あたりも参考に。
|