#NEWLINE# def compute( self ) : #NEWLINE# #INDENT# list1 = self . get_input ( 'List1' ) #NEWLINE# list2 = self . get_input ( 'List2' ) #NEWLINE# if ( len ( list1 ) != len ( list2 ) ) : #NEWLINE# #INDENT# raise ModuleError ( self , 'Both lists must have the same size.' ) #NEWLINE# #UNINDENT# numerical = self . get_input ( 'NumericalProduct' ) #NEWLINE# if numerical : #NEWLINE# #INDENT# result = [ ( a * b ) for ( a , b ) in itertools . izip ( list1 , list2 ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = zip ( list1 , list2 ) #NEWLINE# #UNINDENT# self . set_output ( 'Result' , result )