#NEWLINE# def __getattr__( self , attr ) : #NEWLINE# #INDENT# if ( attr in self . _fields ) : #NEWLINE# #INDENT# return self . _fields [ attr ] . get ( ) #NEWLINE# #UNINDENT# for conditional_field in self . _conditional_fields : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return getattr ( conditional_field , attr ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# raise AttributeError ( ( "No known field '%s'" % attr ) )