#NEWLINE# def remove( self , prefix , key , value , cb ) : #NEWLINE# #INDENT# ' set operation remove on key: prefix+key value: value is a list of items\n        ' #NEWLINE# _log . debug ( ( 'Remove key %s, value %s' % ( ( prefix + key ) , value ) ) ) #NEWLINE# if ( ( prefix + key ) in self . localstore_sets ) : #NEWLINE# #INDENT# self . localstore_sets [ ( prefix + key ) ] [ '+' ] -= set ( value ) #NEWLINE# self . localstore_sets [ ( prefix + key ) ] [ '-' ] |= set ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . localstore_sets [ ( prefix + key ) ] = { #NEWLINE# #INDENT# '+' : set ( [ ] ) , #NEWLINE# '-' : set ( value ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if self . started : #NEWLINE# #INDENT# coded_value = self . coder . encode ( list ( self . localstore_sets [ ( prefix + key ) ] [ '-' ] ) ) #NEWLINE# self . storage . remove ( key = ( prefix + key ) , value = coded_value , cb = CalvinCB ( func = self . remove_cb , org_key = key , org_value = value , org_cb = cb ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if cb : #NEWLINE# #INDENT# cb ( key = key , value = True )