def __setitem__(self, index, value):
        # If the pointer is at the end, append the value at the beginning.
        old = self.pointer
        if self.MAX_SIZE >= self.pointer:
            # Reset pointer position to the beginning, **before** appending.
            self.pointer = 0
            super(CircularBuffer, self).__setitem__(self.pointer, value)
        else:
            # Set the given value
            super(CircularBuffer, self).__setitem__(index, value)

        # Update pointer **after**
        self.pointer += 1
        print('  POINTER: {} => {}'.format(old, self.pointer))
dataset/ETHPy150Open christabor/MoAL/MOAL/data_structures/linear/array/circular_buffer.py/CircularBuffer.__setitem__/swapped operands of `>=`