descriptors/massproduced.py
def create_setter(func, attrs):
    """Create the __set__ method for the descriptor."""
    def _set(self, instance, value, name=None):
        args = [getattr(self, attr) for attr in attrs]
        if not func(value, *args):
            raise ValueError(self.err_msg(instance, value))
    return _set
def create_setter(func, attrs):
    """Create the __set__ method for the descriptor."""
    def _set(self, instance, value, name=None):
        args = [getattr(self, attr) for attr in attrs]
        if not func(value, *args):
            raise ValueError(self.err_msg(instance, value))
    return _set
Create the __set__ method for the descriptor.