diff options
author | Michael W. Hudson <mwh@python.net> | 2002-07-19 15:47:06 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-07-19 15:47:06 (GMT) |
commit | f0d777c56b710f68c96582c10b49d83b5ad7d32d (patch) | |
tree | 6d2bfabfea152207b56f7ea3beac5507b40dd84e /Doc | |
parent | b6cc7d2806d0e7784abf8479bfed3543de48bb97 (diff) | |
download | cpython-f0d777c56b710f68c96582c10b49d83b5ad7d32d.zip cpython-f0d777c56b710f68c96582c10b49d83b5ad7d32d.tar.gz cpython-f0d777c56b710f68c96582c10b49d83b5ad7d32d.tar.bz2 |
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.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/ref/ref3.tex | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ Special read-only attributes: \member{start} is the lower bound; \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 |