def __iter__(self):
        """
        Emulates the iterator interface. When streaming, this means
        delegating to the stream, otherwise iterating over the
        existing result set.
        """
        if self.results is None:
            raise ValueError("No index results to iterate")

        try:
            for result in self.results:
                if self.stream and isinstance(result, CONTINUATION):
                    self.continuation = result.c
                else:
                    yield self._inject_term(result)
        finally:
            if self.stream:
                self.results.close()
def __iter__ ( self ) : if self . results is None : raise ValueError ( "No index results to iterate" ) try : for result in self . results : if self . stream and isinstance ( result , CONTINUATION ) : self . continuation = result . c else : yield self . _inject_term ( result ) finally : if self . stream : self . results . close ( )
Emulates the iterator interface. When streaming, this means
        delegating to the stream, otherwise iterating over the
        existing result set.