diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-08-07 19:38:16 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-08-07 19:38:16 -0500 |
| commit | e1475e2b00bdc62599b6947914e8b389a0307f19 (patch) | |
| tree | c967fa102bd101a8844419f2f73fb9a999fcff01 | |
| parent | Ignore mypy cache (diff) | |
| download | config-file-e1475e2b00bdc62599b6947914e8b389a0307f19.zip | |
Add info on setting with ini
| -rw-r--r-- | README.md | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -192,8 +192,20 @@ new_key = New key value! The exact behavior of how these new keys or sections are added are a bit dependent on the file format we're using, since every format is a little -different in it's structure and in what it supports. See the -[full documentation](#Documentation) for more information there. +different in it's structure and in what it supports. Mostly though, `ini` +is just the odd one. + +If we try the following in `ini`, which does not support subsections or +nested keys, we simply get a single section. + +```python +config.set("section.sub_section.sub_sub_section.key", 5) +``` + +```ini +[section.sub_section.sub_sub_section] +key = 5 +``` Lastly, we can set values using an array notation as well. The underlying content is all manipulated as a dictionary for every file type. If we wanted |