From e1475e2b00bdc62599b6947914e8b389a0307f19 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 7 Aug 2020 19:38:16 -0500 Subject: Add info on setting with ini --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86c0f3d..8cbf360 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.3