Mercurial > hgrepos > Python > libs > ConfigMix
changeset 389:44ef854da70a
Docs
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 10 Nov 2021 09:37:44 +0100 |
| parents | 13427f37abab |
| children | 0521e857c320 |
| files | configmix/config.py docs/introduction.rst |
| diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/configmix/config.py Wed Nov 10 02:43:23 2021 +0100 +++ b/configmix/config.py Wed Nov 10 09:37:44 2021 +0100 @@ -111,6 +111,9 @@ If the path item is a `list` or `tuple` then the namespace is assumed to be `None`. + Note that a caller that wants to use variables from a non-default + namespace must use a sequence of dicts. + No variable interpolation is done and no filters are applied. Quoting of anything in `paths` is *not* needed and wrong.
--- a/docs/introduction.rst Wed Nov 10 02:43:23 2021 +0100 +++ b/docs/introduction.rst Wed Nov 10 09:37:44 2021 +0100 @@ -256,7 +256,9 @@ possible variables names and return the first one that is found. For example -- these methods for retrieving the first found variables -can be used and are equivalent:: +can be used and are equivalent (Note that a caller that wants to use +variables from a non-default namespace must use a sequence of dicts +here):: value1 = config.getfirstvar_s("key1.subkey2", "key3.subkey4", default=None, namespace=None) value2 = config.getfirstvarl_s(*[["key1", "subkey2"], ["key3", "subkey4"]], default=None)
