def __setattr__(self, name, value):
        "Sets attributes after validating that they are allowed."
        if name in {'_Namespace__defaults',
                    '_Namespace__changes',
                    '_Namespace__master'}:
            super().__setattr__(name, value)
        elif '.' in name:
            head, tail = name.split('.', 1)
            self[head][tail] = value
        else:
            if name not in self.__defaults:
                raise AttributeError(name)
            attr = self.__defaults[name]
            if not isinstance(attr, Parameter):
                raise TypeError(name)
            attr.validate(value)
            self.__update_change(name, value, attr)
Sets attributes after validating that they are allowed.
recipes/Python/578173_Settings_Organizer/recipe-578173.py