def _uri_split(uri):
 (scheme, netloc, path, query, fragment) = _safe_urlsplit(uri)
 port = None
 if ('@' in netloc):
  (auth, hostname) = netloc.split('@', 1)
 else:
  auth = None
  hostname = netloc
 if hostname:
  if (':' in hostname):
   (hostname, port) = hostname.split(':', 1)
 return (scheme, auth, hostname, port, path, query, fragment)

def _uri_split ( uri ) : ( scheme , netloc , path , query , fragment ) = _safe_urlsplit ( uri ) port = None if ( '@' in netloc ) : ( auth , hostname ) = netloc . split ( '@' , 1 ) else : auth = None hostname = netloc if hostname : if ( ':' in hostname ) : ( hostname , port ) = hostname . split ( ':' , 1 ) return ( scheme , auth , hostname , port , path , query , fragment )
splits up an uri or iri .