def __repr__(self):
        def to_bin(x, s):
            return bin(x)[2:].zfill(s)[::-1]

        index, offset = self._get_offset(self.size)
        rep = [to_bin(x, BYTE_SIZE) for x in self.array[:index]]
        if offset:
            rep.append(to_bin(self.array[index] & 1 - (1 << offset), offset))
        return ''.join(rep)
dataset/ETHPy150Open douban/dpark/dpark/bitindex.py/BitIndex.__repr__/swapped operands of `-`