#NEWLINE# def Get( self , attribute , default = None ) : #NEWLINE# #INDENT# 'Gets the attribute from this object.' #NEWLINE# if ( attribute is None ) : #NEWLINE# #INDENT# return default #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( attribute , str ) : #NEWLINE# #INDENT# attribute = Attribute . GetAttributeByName ( attribute ) #NEWLINE# #UNINDENT# #UNINDENT# if ( ( 'r' not in self . mode ) and ( ( attribute not in self . new_attributes ) and ( attribute not in self . synced_attributes ) ) ) : #NEWLINE# #INDENT# raise IOError ( ( 'Fetching %s from object not opened for reading.' % attribute ) ) #NEWLINE# #UNINDENT# for result in self . GetValuesForAttribute ( attribute , only_one = True ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# result . attribute_instance = attribute #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return result #NEWLINE# #UNINDENT# return attribute . GetDefault ( result , default )