def test_wraparound(x): """ >>> test_wraparound([1, 2, 3]) [1, 2, 1] """ with cython.wraparound(True): x[-1] = x[0] return x