#NEWLINE# def incr( self , key , delta = 1 ) : #NEWLINE# #INDENT# '\n        Add delta to value in the cache. If the key does not exist, raise a\n        ValueError exception.\n        ' #NEWLINE# if ( key not in self ) : #NEWLINE# #INDENT# raise ValueError ( ( "Key '%s' not found" % key ) ) #NEWLINE# #UNINDENT# new_value = ( self . get ( key ) + delta ) #NEWLINE# self . set ( key , new_value ) #NEWLINE# return new_value