parameters: (self, url)
return_statement: return (scheme, host, port) == (self.scheme, self.host, self.port)
docstring: Check if the given ``url`` is a member of the same host as this
          connection pool.
docstring_summary: Check if the given ``url`` is a member of the same host as this
          connection pool.
docstring_tokens: Check if the given url is a member of the same host as this connection pool .
function: 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)
  
          # 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)
function_tokens: 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 ) # 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 )