cpython-3.5.0: Bindings for libpython
Safe HaskellNone
LanguageHaskell2010

CPython.Types.Slice

Synopsis

Documentation

data Slice Source #

Instances

Instances details
Concrete Slice Source # 
Instance details

Defined in CPython.Types.Slice

Methods

concreteType :: Slice -> Type

Object Slice Source # 
Instance details

Defined in CPython.Types.Slice

sliceType :: Type 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.

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

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.