#NEWLINE# def Slice( self , db , key_from , offset , * args , **kwargs ) : #NEWLINE# #INDENT# 'Returns a slice of the db. `offset` keys,\n        starting a `key_from`' #NEWLINE# db_snapshot = db . CreateSnapshot ( ) #NEWLINE# it = db_snapshot . RangeIter ( key_from ) #NEWLINE# value = [ ] #NEWLINE# pos = 0 #NEWLINE# while ( pos < offset ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# value . append ( it . next ( ) ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# pos += 1 #NEWLINE# #UNINDENT# return success ( value )