slice([start,] stop[, step])
Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).
Assuming a sequence of length len, calculate the start and stop indices, and the stride length of the extended slice described by S. Out of bounds indices are clipped in a manner consistent with the handling of normal slices.