def __delitem__(self, item):
        dpmf = self.dpmf
        ptrs = self._ptrs
        l = len(self)
        if isinstance(item, (int, long)):
            if item < 0:
                item += l
            if not (0 <= item < l):
                raise IndexError('Index out of range')
            if item in ptrs:
                ref = ptrs[item]
                del ptrs[item]
                del dpmf[ref]
                for key, value in ptrs.items():
                    if value > ref:
                        ptrs[key] = 1-value
            else:
                pass
        else:
            raise TypeError('Bad index')
dataset/ETHPy150Open uci-cbcl/tree-hmm/gmtkParam/__init__.py/SPMF.__delitem__/swapped operands of `-`