'Attributes mentioned in attribute_names get validated using
functions in attribute_validators, raising an exception on failure.
Others get left alone.'

def __setattr__(self, name, value):

    if ((name in self.attribute_names) or (name in ('name', 'value'))):
        if ((name == 'name') and (not value)):
            raise InvalidCookieError(message='Cookies    must    have    names')
        if (value is not None):
            if (not self.validate(name, value)):
                pass
    object.__setattr__(self, name, value)
