def __set_namespace(self, key, value):
        "Takes namespace and attempts to update internal state."
        if key in self.__defaults:
            attr = self.__defaults[key]
            if isinstance(attr, Namespace):
                attr.__set_state(value)
            else:
                raise ResourceWarning(repr(key) + ' is not a Namespace!')
        else:
            attr = self.__changes[key] = Namespace()
            attr.__master = self
            attt.__set_state(value)
Takes namespace and attempts to update internal state.
recipes/Python/578173_Settings_Organizer/recipe-578173.py