#NEWLINE# def get_connection_string( scheme , address , params ) : #NEWLINE# #INDENT# if address : #NEWLINE# #INDENT# address = ':' . join ( ( str ( b ) for b in address ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# address = '' #NEWLINE# #UNINDENT# if params : #NEWLINE# #INDENT# address += ( '?' + urlencode ( params ) ) #NEWLINE# #UNINDENT# return ( ( scheme + '://' ) + address )