(cstr_arg_list)
return ' '.join(buf)
Put fragments back together.

    >>> merge_connect_string([('host', 'ip'), ('pass', ''), ('x', ' ')])
    "host=ip pass='' x=' '"
Put fragments back together.
Put fragments back together .
def merge_connect_string(cstr_arg_list):
    """Put fragments back together.

    >>> merge_connect_string([('host', 'ip'), ('pass', ''), ('x', ' ')])
    "host=ip pass='' x=' '"
    """
    global _cstr_badval_rc
    if not _cstr_badval_rc:
        _cstr_badval_rc = re.compile(_cstr_badval_rx)

    buf = []
    for k, v in cstr_arg_list:
        if not v or _cstr_badval_rc.search(v):
            v = v.replace('\\', r'\\')
            v = v.replace("'", r"\'")
            v = "'" + v + "'"
        buf.append("%s=%s" % (k, v))
    return ' '.join(buf)
def merge_connect_string ( cstr_arg_list ) : global _cstr_badval_rc if not _cstr_badval_rc : _cstr_badval_rc = re . compile ( _cstr_badval_rx ) buf = [ ] for k , v in cstr_arg_list : if not v or _cstr_badval_rc . search ( v ) : v = v . replace ( '\\' , r'\\' ) v = v . replace ( "'" , r"\'" ) v = "'" + v + "'" buf . append ( "%s=%s" % ( k , v ) ) return ' ' . join ( buf )