def dump(obj, canonical=False, transport=False):
    if transport:
        canonical = True

    if isinstance(obj, (str, bytes)):
        exp = dump_string(obj, canonical)
    elif isinstance(obj, dict):
        exp = dump_list(obj.items(), canonical)
    elif isinstance(obj, (list, tuple)):
        exp = dump_list(obj, canonical)
    elif isinstance(obj, int):
        exp = dump_string(str(obj), canonical)
    else:
        raise TypeError((type(obj), obj) % "unsupported object type %r of %r")

    if transport:
        return b"{" + base64.b64encode(exp) + b"}"
    else:
        return exp
dataset/ETHPy150Open grawity/hacks/lib/python/nullroute/sexp.py/dump/swapped operands of `%`