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

Class slice

object --+
         |
        slice

slice(stop) 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, ...)
 
__reduce__(...)
Return state information for pickling.
 
__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.

Inherited from object: __delattr__, __format__, __init__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  start
  step
  stop

Inherited from object: __class__

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__

__reduce__(...)

 

Return state information for pickling.

Overrides: object.__reduce__

__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)