'A generator for iterating over the result cache.
Also populates the cache if there are more possible results to
yield. Raises StopIteration when there are no more results.'

def _iter_results(self):

    if (self._result_cache is None):
        self._result_cache = []
    pos = 0
    while True:
        while (pos < len(self._result_cache)):
            (yield self._result_cache[pos])
            pos += 1
        if (not self._has_more):
            raise StopIteration
        if (len(self._result_cache) <= pos):
            self._populate_cache()
