def Slice(self, db, key_from, offset, *args, **kwargs):
        """Returns a slice of the db. `offset` keys,
        starting a `key_from`"""
        # Operates over a snapshot in order to return
        # a consistent state of the db
        db_snapshot = db.CreateSnapshot()
        it = db_snapshot.RangeIter(key_from)
        value = []
        pos = 0

        while pos < offset:
            try:
                value.append(it.next())
            except __HOLE__:
                break
            pos += 1

        return success(value)
dataset/ETHPy150Open oleiade/Elevator/debian/elevator/usr/lib/python2.6/dist-packages/elevator/api.py/Handler.Slice