cpython-3.3.0: Bindings for libpython

Safe HaskellNone

CPython.Types.Slice

Synopsis

Documentation

new :: (Object start, Object stop, Object step) => Maybe start -> Maybe stop -> Maybe step -> IO SliceSource

Return a new slice object with the given values. The start, stop, and step parameters are used as the values of the slice object attributes of the same names. Any of the values may be Nothing, in which case None will be used for the corresponding attribute.

getIndicesSource

Arguments

:: Slice 
-> Integer

Sequence length

-> IO (Integer, Integer, Integer, Integer) 

Retrieve the start, stop, step, and slice length from a Slice, assuming a sequence of the given length.