cpython-3.4.0: Bindings for libpython

Safe HaskellNone
LanguageHaskell98

CPython.Types.Slice

Synopsis

Documentation

new :: (Object start, Object stop, Object step) => Maybe start -> Maybe stop -> Maybe step -> IO Slice Source #

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.

getIndices Source #

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.