def _iterslice(self, slice):
        """Yield records from a slice index."""
        indices = range(*slice.indices(len(self._records)))
        if self.is_attached():
            rows = self._enum_attached_rows(indices)
            if slice.step is not None and slice.step < 0:
                rows = reversed(list(rows))
        else:
            rows = zip(indices, self._records[slice])

        fields = self.fields
        for i, row in rows:
            yield Record._make(fields, row, self, i)
def _iterslice ( self , slice ) : indices = range ( * slice . indices ( len ( self . _records ) ) ) if self . is_attached ( ) : rows = self . _enum_attached_rows ( indices ) if slice . step is not None and slice . step < 0 : rows = reversed ( list ( rows ) ) else : rows = zip ( indices , self . _records [ slice ] ) fields = self . fields for i , row in rows : yield Record . _make ( fields , row , self , i )
Yield records from a slice index.