def gatherBy(self, func):
        'Generate only rows for which the given func returns True.'
        for i in rotate_range(len(self.rows), self.cursorRowIndex):
            try:
                r = self.rows[i]
                if func(r):
                    yield r
            except Exception:
                pass
def gatherBy ( self , func ) : for i in rotate_range ( len ( self . rows ) , self . cursorRowIndex ) : try : r = self . rows [ i ] if func ( r ) : yield r except Exception : pass
Generate only rows for which the given func returns True.