def connection_from_url(url, **kw):
 (scheme, host, port) = get_host(url)
 if (scheme == 'https'):
  return HTTPSConnectionPool(host, port=port, **kw)
 else:
  return HTTPConnectionPool(host, port=port, **kw)

def connection_from_url ( url , ** kw ) : ( scheme , host , port ) = get_host ( url ) if ( scheme == 'https' ) : return HTTPSConnectionPool ( host , port = port , ** kw ) else : return HTTPConnectionPool ( host , port = port , ** kw )
given a url .