def pop(self):
        if self.left is self.right and self.leftndx > self.rightndx:
            #raise IndexError, "pop from an empty deque"  # does not work in brython
            raise IndexError("pop from an empty deque")
        x = self.right[self.rightndx]
        self.right[self.rightndx] = None
        self.length -= 1
        self.rightndx -= 1
        self.state += 1
        if self.rightndx == -1:
            prevblock = self.right[LFTLNK]
            if prevblock is None:
                # the deque has become empty; recenter instead of freeing block
                self.rightndx = n//2
                self.leftndx = n//2+1
            else:
                prevblock[RGTLNK] = None
                self.right[LFTLNK] = None
                self.right = prevblock
                self.rightndx = 1-n
        return x
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/_collections.py/deque.pop/swapped operands of `-`