comparison docs/introduction.rst @ 742:220a9ec9ac72

- Docs the the new list merging strategies. Also some more words about merging generally. - One more test about the default of "replacing" lists.
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 29 Oct 2023 17:29:16 +0100
parents 3686bad61391
children
comparison
equal deleted inserted replaced
741:e069797f0e36 742:220a9ec9ac72
192 ``.toml`` 192 ``.toml``
193 for TOML configuration file 193 for TOML configuration file
194 194
195 ``.yml`` or ``.yaml`` 195 ``.yml`` or ``.yaml``
196 for YAML configuration files 196 for YAML configuration files
197
198 When loading two or more configuration files the configurations will be
199 merged:
200
201 * later values overwrite earlier values
202 * :py:class:`dict`-like objects are merged `recursively`
203 * :py:class:`list` objects are by default completely replaced by later ones.
204 When using ``merge_lists="extend"`` then later list extend earlier lists,
205 when using ``merge_lists="prepend"`` then earlier lists extend later ones.
206
207 This is done `non-recursively`.
197 208
198 209
199 .. _getting-values: 210 .. _getting-values:
200 211
201 Getting configuration variables 212 Getting configuration variables