#NEWLINE# def _expand( self , sectiongroupname , sectionname , section , seen ) : #NEWLINE# #INDENT# if ( ( sectiongroupname , sectionname ) in seen ) : #NEWLINE# #INDENT# raise ValueError ( 'Circular macro expansion.' ) #NEWLINE# #UNINDENT# seen . add ( ( sectiongroupname , sectionname ) ) #NEWLINE# macronames = section [ '<' ] . split ( ) #NEWLINE# for macroname in macronames : #NEWLINE# #INDENT# if ( ':' in macroname ) : #NEWLINE# #INDENT# ( macrogroupname , macroname ) = macroname . split ( ':' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# macrogroupname = sectiongroupname #NEWLINE# #UNINDENT# macro = self [ macrogroupname ] [ macroname ] #NEWLINE# if ( '<' in macro ) : #NEWLINE# #INDENT# self . _expand ( macrogroupname , macroname , sectionname , seen ) #NEWLINE# #UNINDENT# if ( sectiongroupname in self . macro_cleaners ) : #NEWLINE# #INDENT# macro = macro . copy ( ) #NEWLINE# self . macro_cleaners [ sectiongroupname ] ( macro ) #NEWLINE# #UNINDENT# for key in macro : #NEWLINE# #INDENT# if ( key not in section ) : #NEWLINE# #INDENT# section . _dict [ key ] = macro . _dict [ key ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# del section [ '<' ]