Mercurial > hgrepos > Python > libs > ConfigMix
changeset 517:328af767f5f8
Implement Configuration.items() and Configuration.values() without interpolating the values
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 19 Dec 2021 16:04:40 +0100 |
| parents | ad1e630ba736 |
| children | 55b8aed70f7d |
| files | configmix/config.py |
| diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/configmix/config.py Sun Dec 19 14:36:18 2021 +0100 +++ b/configmix/config.py Sun Dec 19 16:04:40 2021 +0100 @@ -380,6 +380,16 @@ """ return super(Configuration, self).__getitem__(key) + def items(self): + """Items without interpolation""" + for k in self: + yield (k, self.getitem_ns(k)) + + def values(self): + """Values without interpolation""" + for k in self: + yield self.getitem_ns(k) + def getvarl(self, *path, **kwds): """Get a variable where the hierarchy is given in `path` as sequence and the namespace is given in the `namespace` keyword argument.
