You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,10 +35,10 @@ To create `KeyValues` instance **from your own object with `dict` interface** (a
33
35
kv = KeyValues(mapper=)
34
36
```
35
37
36
-
All these instantiation variants have common optional parameter `key_sorter=`. It's a sorting function which will be applied to keys when you use methods `dump()` or `write()` (or `print(kv)`, which is in fact shortcut for `print(kv.dump())`). For example you can use `key_sorter=sorted` and keys will be represented in alphabetical order; `key_sorter=reversed` for reverse order. Instance's attribute. Default: `None`
38
+
All these instantiation variants have common optional parameter `key_sorter=`. It's a sorting function which will be applied to keys when you use methods `dump()` or `write()` (or `print(kv)`, which is in fact shortcut for `print(kv.dump())`). For example you can use `key_sorter=sorted` and keys will be represented in alphabetical ascending order; `key_sorter=reversed` for reverse order. Instance's attribute. Default: `None`
37
39
38
40
### Methods
39
-
*`parse(filename)` - parses the VDF file to `dict` interface representation, i.e. KeyValues can be accessed and modified by `mapper[key] = value` operations. Optional arguments:
41
+
*`parse(filename)` - parses the VDF file to `dict` interface representation, i.e. KeyValues can be accessed and modified by `kv[key] = value` operations. Optional arguments:
*`mapper_type=` - [see Instantiation section](README.md#instantiation). This will override the instance's attribute `mapper_type`. Default: `collections.OrderedDict` (stores the keys in the order they have been added)
42
44
*`key_modifier=` - [see Instantiation section](README.md#instantiation). This will override the instance's attribute `key_modifier`. Default: `None`
@@ -61,3 +63,7 @@ Of course the class KeyValues also provides the standard `dict` interface method
61
63
*example_02.py* - using the optional functions
62
64
63
65
*example_03.py* - "advanced" uses
66
+
67
+
# What is missing
68
+
69
+
Generally the checking of VDF file syntax, i.e. if brackets are closed and so on. The only check is if after `"key"` is a starting bracket `{`.
0 commit comments