#NEWLINE# def add_section( self , view , generator , index = None ) : #NEWLINE# #INDENT# def with_type( gen ) : #NEWLINE# #INDENT# def newgen( ) : #NEWLINE# #INDENT# res = gen ( ) #NEWLINE# try : #NEWLINE# #INDENT# res . set_current_view_type ( self . output_type ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return res #NEWLINE# #UNINDENT# return newgen #NEWLINE# #UNINDENT# super ( ReportOfType , self ) . add_section ( view , with_type ( generator ) , index )