cpython-3.3.0: Bindings for libpython

Safe HaskellNone

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.