A few days ago, Guido said (in the thread "[Python-Dev] Python
version of PySlice_GetIndicesEx"):
> OK. Michael, if you want to check in indices(), go ahead.
Then I did what was needed, but didn't check it in. Here it is.
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex
index d719db3..9f8d262 100644
--- a/Doc/ref/ref3.tex
+++ b/Doc/ref/ref3.tex
@@ -892,6 +892,15 @@
\ttindex{stop}
\ttindex{step}}
+Special method: \method{indices} takes an single integer argument
+\var{length} and computes information about the extended slice that
+the slice object would describe if applied to a sequence of
+\var{length}. It returns a tuple of three integers; respectively
+these are the \var{start} and \var{stop} indices and the \var{step} or
+stride length of the slice. Missing or out-of-bounds indices are
+handled in a manner consistent with regular slices.
+\versionadded{2.3}
+
\end{description} % Internal types
\end{description} % Types