(self)
Convert to punycode hostname
Convert to punycode hostname
Convert to punycode hostname
def punycode(self):
        '''Convert to punycode hostname'''
        if self._host:
            self._host = IDNA.encode(self._host.decode('utf-8'))[0]
            return self
        raise TypeError('Cannot punycode a relative url')
def punycode ( self ) : if self . _host : self . _host = IDNA . encode ( self . _host . decode ( 'utf-8' ) ) [ 0 ] return self raise TypeError ( 'Cannot punycode a relative url' )