cpython-3.3.0: Bindings for libpython

Safe HaskellNone




sequenceIteratorNew :: Sequence seq => seq -> IO SequenceIteratorSource

Return an Iterator that works with a general sequence object, seq. The iteration ends when the sequence raises IndexError for the subscripting operation.

callableIteratorNew :: (Object callable, Object sentinel) => callable -> sentinel -> IO CallableIteratorSource

Return a new Iterator. The first parameter, callable, can be any Python callable object that can be called with no parameters; each call to it should return the next item in the iteration. When callable returns a value equal to sentinel, the iteration will be terminated.