iter on all objects
authorgwen <gremond@cadoles.com>
Thu, 7 Mar 2013 10:02:18 +0000 (11:02 +0100)
committergwen <gremond@cadoles.com>
Thu, 7 Mar 2013 10:02:18 +0000 (11:02 +0100)
tiramisu/config.py

index ff6595d..f3701cb 100644 (file)
@@ -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