[Python-checkins] python/dist/src/Doc/ref ref3.tex,1.90,1.91

mwh@users.sourceforge.net mwh@users.sourceforge.net
Tue, 11 Jun 2002 03:55:41 -0700


Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv9709/Doc/ref

Modified Files:
	ref3.tex 
Log Message:
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.



Index: ref3.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** ref3.tex	4 Jun 2002 16:25:57 -0000	1.90
--- ref3.tex	11 Jun 2002 10:55:08 -0000	1.91
***************
*** 253,256 ****
--- 253,263 ----
  \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: