def new(spec, type_name='bread_struct', data=None):
    struct = build_struct(spec, type_name)

    if data is None:
        data = BitArray(bytearray(int(math.ceil(8.0 / len(struct)))))

    if len(struct) > len(data):
        raise ValueError(
            ("Data being parsed isn't long enough; expected at least %d "
             "bits, but data is only %d bits long") %
            (len(struct), len(data)))

    struct._set_data(data[:len(struct)])
    struct._offset = 0

    return struct
dataset/ETHPy150Open alexras/bread/bread/lifecycle.py/new/swapped operands of `/`