def DictionaryToParamList(url_parameters, escape_params=True):
 transform_op = [str, urllib.quote_plus][bool(escape_params)]
 parameter_tuples = [(transform_op(param), transform_op(value)) for (param, value) in (url_parameters or {}).items()]
 return ['='.join(x) for x in parameter_tuples]

def DictionaryToParamList ( url_parameters , escape_params = True ) : transform_op = [ str , urllib . quote_plus ] [ bool ( escape_params ) ] parameter_tuples = [ ( transform_op ( param ) , transform_op ( value ) ) for ( param , value ) in ( url_parameters or { } ) . items ( ) ] return [ '=' . join ( x ) for x in parameter_tuples ]
convert a dictionary of url arguments into a url parameter string .