March 2003
Intermediate to advanced
656 pages
39h 30m
English
slice
slice([start,]stop[,step])
Creates and returns a slice object with read-only attributes
start, stop, and
step bound to the respective argument values, each
defaulting to None when missing. Such a slice is
meant to signify the same set of indices as
range(
start,stop,step).
Slicing syntax
obj
[
start:stop:step
]
passes such a slice object as the argument to the __getitem__, __setitem__, or
__delitem__ method of object
obj, as appropriate. It is up to
obj to interpret the slice objects that
its methods receive. See also Section 5.3.2.4.