#NEWLINE# def urlunsplit( parameters ) : #NEWLINE# #INDENT# ( scheme , netloc , url , query , fragment ) = parameters #NEWLINE# if ( netloc or ( scheme and ( scheme in uses_netloc ) and ( url [ : 2 ] != '//' ) ) ) : #NEWLINE# #INDENT# if ( url and ( url [ : 1 ] != '/' ) ) : #NEWLINE# #INDENT# url = ( '/' + url ) #NEWLINE# #UNINDENT# url = ( ( '//' + ( netloc or '' ) ) + url ) #NEWLINE# #UNINDENT# if scheme : #NEWLINE# #INDENT# url = ( ( scheme + ':' ) + url ) #NEWLINE# #UNINDENT# if query : #NEWLINE# #INDENT# url = ( ( url + '?' ) + query ) #NEWLINE# #UNINDENT# if fragment : #NEWLINE# #INDENT# url = ( ( url + '#' ) + fragment ) #NEWLINE# #UNINDENT# return url