#NEWLINE# def __init__( self , input_pattern , output_pattern , method , frequency ) : #NEWLINE# #INDENT# self . input_pattern = input_pattern #NEWLINE# self . output_pattern = output_pattern #NEWLINE# self . method = method #NEWLINE# self . frequency = int ( frequency ) #NEWLINE# if ( method not in AGGREGATION_METHODS ) : #NEWLINE# #INDENT# raise ValueError ( ( "Invalid aggregation method '%s'" % method ) ) #NEWLINE# #UNINDENT# self . aggregation_func = AGGREGATION_METHODS [ self ] #NEWLINE# self . build_regex ( ) #NEWLINE# self . build_template ( ) #NEWLINE# self . cache = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# }