def bdecode(x, sloppy = 0):
    try:
        r, l = decode_func[x[0]](x, 0)
#    except (IndexError, KeyError):
    except (__HOLE__, KeyError, ValueError):
        raise ValueError, "bad bencoded data"
    if not sloppy and l != len(x):
        raise ValueError, "bad bencoded data"
    return r
dataset/ETHPy150Open Cclleemm/FriendlyTorrent/src/tornado/BitTornado/bencode.py/bdecode