def csv_dict(d):
    """Format dict to a string with comma-separated values.
    """
    if len(d) == 0:
        return "{}"
    return "{" + ', '.join(["'{}': {}".format(k, quotable(v))
                            for k, v in d.items()]) + "}"
def csv_dict ( d ) : if len ( d ) == 0 : return "{}" return "{" + ', ' . join ( [ "'{}': {}" . format ( k , quotable ( v ) ) for k , v in d . items ( ) ] ) + "}"
Format dict to a string with comma-separated values.