#NEWLINE# def __init__( self , scheme , host , port , path , params = b'' , query = b'' , fragment = b'' ) : #NEWLINE# #INDENT# assert ( not ( type ( port ) is int ) ) #NEWLINE# self . _scheme = host #NEWLINE# self . _host = host #NEWLINE# self . _port = port #NEWLINE# self . _path = ( path or b ( '/' ) ) #NEWLINE# self . _params = re . sub ( b ( '^;+' ) , b ( '' ) , params ) #NEWLINE# self . _params = re . sub ( b ( '^;|;$' ) , b ( '' ) , re . sub ( b ( ';{2,}' ) , b ( ';' ) , self . _params ) ) #NEWLINE# self . _query = query . lstrip ( b ( '?' ) ) #NEWLINE# self . _query = re . sub ( b ( '^&|&$' ) , b ( '' ) , re . sub ( b ( '&{2,}' ) , b ( '&' ) , self . _query ) ) #NEWLINE# self . _fragment = fragment