def validate(self, value):
        "Verifies that the value has the same type and is considered valid."
        if not isinstance(value, type(self.value)):
            raise TypeError('Value has a different type!')
        if not self.__validator(value):
            raise ValueError('Validator failed the value!')
Verifies that the value has the same type and is considered valid.
recipes/Python/578173_Settings_Organizer/recipe-578173.py