From 11ad037af902e0792664c756a3788d0afbdabf51 Mon Sep 17 00:00:00 2001 From: gwen Date: Thu, 7 Mar 2013 11:02:18 +0100 Subject: [PATCH] iter on all objects --- tiramisu/config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tiramisu/config.py b/tiramisu/config.py index ff6595d..f3701cb 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -382,6 +382,15 @@ class Config(object): except: pass # option with properties + def iter_all(self): + """A way of parsing options **and** groups. + iteration on Options and OptionDescriptions.""" + for child in self._cfgimpl_descr._children: + try: + yield child._name, getattr(self, child._name) + except: + pass # option with properties + def iter_groups(self, group_type=None): """iteration on groups objects only. All groups are returned if `group_type` is `None`, otherwise the groups