To reproduce, on a system with 64 bits in sys.maxint: $ python x = [3,4,5] del x[1:] x = [3,4,5] from operator import delslice import sys delslice(x, 1, sys.maxint) Traceback (most recent call last): File "", line 1, in OverflowError: signed integer is greater than maximum
The patch looks correct to me, but I can't test it since I don't have a 64 bit system. I posted the patch with added tests here: http://freeweb.siol.net/chollus/ Can someone with the right privileges attach that file here?