def _safe_urlsplit(s):
 rv = urlparse.urlsplit(s)
 if (type(rv[2]) is not type(s)):
  assert hasattr(urlparse, 'clear_cache')
  urlparse.clear_cache()
  rv = urlparse.urlsplit(s)
  assert (type(rv[2]) is type(s))
 return rv

def _safe_urlsplit ( s ) : rv = urlparse . urlsplit ( s ) if ( type ( rv [ 2 ] ) is not type ( s ) ) : assert hasattr ( urlparse , 'clear_cache' ) urlparse . clear_cache ( ) rv = urlparse . urlsplit ( s ) assert ( type ( rv [ 2 ] ) is type ( s ) ) return rv
the urlparse .