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.
This commit is contained in:
Michael W. Hudson 2002-06-11 10:55:12 +00:00
parent f90ae20354
commit 5efaf7eac8
13 changed files with 570 additions and 22 deletions

View file

@ -252,6 +252,13 @@ sequence of the same type. This implies that the index set is
renumbered so that it starts at 0.
\index{slicing}
Some sequences also support ``extended slicing'' with a third ``step''
parameter: \code{\var{a}[\var{i}:\var{j}:\var{k}]} selects all items
of \var{a} with index \var{x} where \code{\var{x} = \var{i} +
\var{n}*\var{k}}, \var{n} \code{>=} \code{0} and \var{i} \code{<=}
\var{x} \code{<} \var{j}.
\index{extended slicing}
Sequences are distinguished according to their mutability:
\begin{description}