(self, encoding)
return result.decode('utf-8').encode(encoding)
Return the url in an arbitrary encoding
Return the url in an arbitrary encoding
Return the url in an arbitrary encoding
def encode(self, encoding):
        '''Return the url in an arbitrary encoding'''
        netloc = self._host
        if self._port:
            netloc += (b(':') + bytes(self._port))

        result = urlunparse((
            self._scheme, netloc, self._path,
            self._params, self._query, self._fragment
        ))
        return result.decode('utf-8').encode(encoding)
def encode ( self , encoding ) : netloc = self . _host if self . _port : netloc += ( b ( ':' ) + bytes ( self . _port ) ) result = urlunparse ( ( self . _scheme , netloc , self . _path , self . _params , self . _query , self . _fragment ) ) return result . decode ( 'utf-8' ) . encode ( encoding )