comparison configmix/config.py @ 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
comparison
equal deleted inserted replaced
516:ad1e630ba736 517:328af767f5f8
377 377
378 No variable interpolation and key path access. 378 No variable interpolation and key path access.
379 379
380 """ 380 """
381 return super(Configuration, self).__getitem__(key) 381 return super(Configuration, self).__getitem__(key)
382
383 def items(self):
384 """Items without interpolation"""
385 for k in self:
386 yield (k, self.getitem_ns(k))
387
388 def values(self):
389 """Values without interpolation"""
390 for k in self:
391 yield self.getitem_ns(k)
382 392
383 def getvarl(self, *path, **kwds): 393 def getvarl(self, *path, **kwds):
384 """Get a variable where the hierarchy is given in `path` as sequence 394 """Get a variable where the hierarchy is given in `path` as sequence
385 and the namespace is given in the `namespace` keyword argument. 395 and the namespace is given in the `namespace` keyword argument.
386 396