def relative(self):
        """
        The FQDN as a string in relative form
        """
        if not self.is_valid:
            raise ValueError('invalid FQDN `{0}`'.format(self.fqdn))

        if self.is_valid_absolute:
            return self.fqdn[:-1]

        return self.fqdn
def relative ( self ) : if not self . is_valid : raise ValueError ( 'invalid FQDN `{0}`' . format ( self . fqdn ) ) if self . is_valid_absolute : return self . fqdn [ : - 1 ] return self . fqdn
The FQDN as a string in relative form