descriptors/Descriptor.py
def err_msg(self, instance, value):
        """Return an error message for use in exceptions thrown by
        subclasses.

        """
        if not hasattr(self, "name"):
            # err_msg will be called by the composed descriptor
            return ""
        return (
            "Attempted to set the {f_type} attribute {inst}.{attr} to the "
            "{val_type} value {val}, which does not satisfy the condition "
            "{f_type}.".format(
                f_type=self.field_type,
                inst=instance.__class__.__name__,
                attr=self.name,
                val_type=value.__class__.__name__,
                val=value))
def err_msg(self, instance, value):
        if not hasattr(self, "name"):
            # err_msg will be called by the composed descriptor
            return ""
        return (
            "Attempted to set the {f_type} attribute {inst}.{attr} to the "
            "{val_type} value {val}, which does not satisfy the condition "
            "{f_type}.".format(
                f_type=self.field_type,
                inst=instance.__class__.__name__,
                attr=self.name,
                val_type=value.__class__.__name__,
                val=value))
def err_msg ( self , instance , value ) : if not hasattr ( self , "name" ) : # err_msg will be called by the composed descriptor return "" return ( "Attempted to set the {f_type} attribute {inst}.{attr} to the " "{val_type} value {val}, which does not satisfy the condition " "{f_type}." . format ( f_type = self . field_type , inst = instance . __class__ . __name__ , attr = self . name , val_type = value . __class__ . __name__ , val = value ) )
Return an error message for use in exceptions thrown by
        subclasses.
Return an error message for use in exceptions thrown by subclasses .