def args_to_str(*args, **kwargs):
    """Return a string for the given args/kwargs."""
    try:
        handler_args = ",".join([_param_to_str(x) for x in args])
        if kwargs:
            kw_args = ",".join(
                [(k, _param_to_str(v)) % "%s=%s" for (k, v) in kwargs.iteritems()])
            handler_args = "%s,%s" % (handler_args, kw_args)
        if isinstance(handler_args, unicode):
            return handler_args.encode('utf-8', 'ignore')
        return handler_args
    except:
        return 'ERROR'
dataset/ETHPy150Open pinterest/kingpin/kingpin/thrift_utils/thrift_client_mixin.py/args_to_str/swapped operands of `%`