This is my nearly two year old patch
[ 400998 ] experimental support for extended slicing on lists
somewhat spruced up and better tested than it was when I wrote it.
Includes docs & tests. The whatsnew section needs expanding, and arrays
should support extended slices -- later.
diff --git a/Include/sliceobject.h b/Include/sliceobject.h
index d9d6934..cd40a1b 100644
--- a/Include/sliceobject.h
+++ b/Include/sliceobject.h
@@ -32,6 +32,9 @@
PyObject* step);
DL_IMPORT(int) PySlice_GetIndices(PySliceObject *r, int length,
int *start, int *stop, int *step);
+DL_IMPORT(int) PySlice_GetIndicesEx(PySliceObject *r, int length,
+ int *start, int *stop,
+ int *step, int *slicelength);
#ifdef __cplusplus
}