(self, url)
return (scheme, host, port) == (self.scheme, self.host, self.port)
Check if the given ``url`` is a member of the same host as this
        connection pool.
Check if the given ``url`` is a member of the same host as this
        connection pool.
Check if the given url is a member of the same host as this connection pool .
def is_same_host(self, url):
        """
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        """
        if url.startswith('/'):
            return True

        # TODO: Add optional support for socket.gethostbyname checking.
        scheme, host, port = get_host(url)
        if host is not None:
            host = _normalize_host(host, scheme=scheme)

        # Use explicit default port for comparison when none is given
        if self.port and not port:
            port = port_by_scheme.get(scheme)
        elif not self.port and port == port_by_scheme.get(scheme):
            port = None

        return (scheme, host, port) == (self.scheme, self.host, self.port)
def is_same_host ( self , url ) : if url . startswith ( '/' ) : return True # TODO: Add optional support for socket.gethostbyname checking. scheme , host , port = get_host ( url ) if host is not None : host = _normalize_host ( host , scheme = scheme ) # Use explicit default port for comparison when none is given if self . port and not port : port = port_by_scheme . get ( scheme ) elif not self . port and port == port_by_scheme . get ( scheme ) : port = None return ( scheme , host , port ) == ( self . scheme , self . host , self . port )