slice :: Class slice
[hide private]
[frames] | no frames]

type slice

object --+
         |
        slice

slice([start,] stop[, step])

Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).

Instance Methods [hide private]
 
__cmp__(x, y)
cmp(x,y)
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
 
__hash__(x)
hash(x)
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__repr__(x)
repr(x)
(start, stop, stride)
indices(S, len)
Assuming a sequence of length len, calculate the start and stop indices, and the stride length of the extended slice described by S.
Properties [hide private]
  start
  step
  stop
Method Details [hide private]

__getattribute__(...)

 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__

__hash__(x)
(Hashing function)

 

hash(x)

Overrides: object.__hash__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(x)
(Representation operator)

 

repr(x)

Overrides: object.__repr__

indices(S, len)

 

Assuming a sequence of length len, calculate the start and stop indices, and the stride length of the extended slice described by S. Out of bounds indices are clipped in a manner consistent with the handling of normal slices.

Returns: (start, stop, stride)