def keys(self, self_only=False): res = MultiOrderedDict.keys(self) if self_only: return res for d in self._templates: for key in d.keys(): if key not in res: res.append(key) for d in self._defaults: for key in d.keys(): if key not in res: res.append(key) return res
def keys(self, self_only=False): """ Get the keys from this section. If self_only is True, then keys from this section's defaults and templates are not included in the returned value """ res = MultiOrderedDict.keys(self) if self_only: return res for d in self._templates: for key in d.keys(): if key not in res: res.append(key) for d in self._defaults: for key in d.keys(): if key not in res: res.append(key) return res