ewoksdata.data.contextiterator.ContextIterator#

class ewoksdata.data.contextiterator.ContextIterator(it)[source]#

Bases: Generator

Can wrap an iterator or generator to ensure cleanup when used as a context manager.

Parameters:

it (Iterator) –

close()#

Raise GeneratorExit inside generator.

send(value)[source]#

Send a value into the generator. Return next yielded value or raise StopIteration.

throw(*args)[source]#

Raise an exception in the generator. Return next yielded value or raise StopIteration.