#NEWLINE# def get( self , value = None , **kwargs ) : #NEWLINE# #INDENT# if ( value is not None ) : #NEWLINE# #INDENT# doc = { #NEWLINE# #INDENT# self . primary_key : value , #NEWLINE# #UNINDENT# } #NEWLINE# doc . update ( kwargs ) #NEWLINE# return [ item for item in self . db . find ( doc ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if kwargs : #NEWLINE# #INDENT# return [ item for item in self . db . find ( kwargs ) ]