#NEWLINE# def __getattr__( self , identifier ) : #NEWLINE# #INDENT# '\n        Allows creating sub OptionTree instances using attribute\n        access, inheriting the group options.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# return super ( AttrTree , self ) . __getattr__ ( identifier ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if identifier . startswith ( '_' ) : #NEWLINE# #INDENT# raise AttributeError ( str ( identifier ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . fixed == True ) : #NEWLINE# #INDENT# raise AttributeError ( ( self . _fixed_error % identifier ) ) #NEWLINE# #UNINDENT# #UNINDENT# valid_id = sanitize_identifier ( identifier , escape = False ) #NEWLINE# if ( valid_id in self . children ) : #NEWLINE# #INDENT# return self . __dict__ [ valid_id ] #NEWLINE# #UNINDENT# self . __setattr__ ( identifier , self . groups ) #NEWLINE# return self [ identifier ]