cpython-3.4.0: Bindings for libpython

Safe HaskellNone
LanguageHaskell98

CPython.Protocols.Iterator

Synopsis

Documentation

castToIterator :: Object a => a -> IO (Maybe SomeIterator) Source #

Attempt to convert an object to a generic Iterator. If the object does not implement the iterator protocol, returns Nothing.

next :: Iterator iter => iter -> IO (Maybe SomeObject) Source #

Return the next value from the iteration, or Nothing if there are no remaining items.