def __iter__()

in functions/source/create-db/psycopg2/extras.py [0:0]


    def __iter__(self):
        try:
            if self._prefetch:
                res = super(DictCursorBase, self).__iter__()
                first = next(res)
            if self._query_executed:
                self._build_index()
            if not self._prefetch:
                res = super(DictCursorBase, self).__iter__()
                first = next(res)

            yield first
            while 1:
                yield next(res)
        except StopIteration:
            return