diff --git a/tiramisu/config.py b/tiramisu/config.py index efa2ba5..332a9f1 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -223,7 +223,14 @@ class Config(object): return self._getattr(name) def _getattr(self, name, permissive=False): - "attribute notation mechanism for accessing the value of an option" + """ + attribute notation mechanism for accessing the value of an option + :param name: attribute name + :param permissive: permissive doesn't raise some property error + (see ``_cfgimpl_permissive``) + :return: option's value if name is an option name, OptionDescription + otherwise + """ # attribute access by passing a path, # for instance getattr(self, "creole.general.family.adresse_ip_eth0") if '.' in name: diff --git a/tiramisu/option.py b/tiramisu/option.py index 2d1d7cc..da0b49e 100644 --- a/tiramisu/option.py +++ b/tiramisu/option.py @@ -221,6 +221,14 @@ class Option(HiddenBaseType, DisabledBaseType): return config._cfgimpl_value_owners[self._name] def is_default_owner(self, config, all_default=True): + """ + :param config: *must* be only the **parent** config + (not the toplevel config) + :param all_default: only for multi options, if True and the owner list + has something else than "default" returns False, if False and the owner + list has at least one "default" owner, returns True + :return: boolean + """ if self.is_multi(): owners = self.getowner(config) for owner in owners: