def is_subdomain(self, other):
        """Test if the object is a subdomain of the other.

        :param other: the object to which we compare this instance
        :returns: True if this instance is a subdomain of the other
        """
        compared = other.value if hasattr(other, 'value') else other
        try:
            return self.value.is_subdomain(compared)
        except AttributeError:
            return False
def is_subdomain ( self , other ) : compared = other . value if hasattr ( other , 'value' ) else other try : return self . value . is_subdomain ( compared ) except AttributeError : return False
Test if the object is a subdomain of the other.

        :param other: the object to which we compare this instance
        :returns: True if this instance is a subdomain of the other