'Gets the attribute from this object.'

def Get(self, attribute, default=None):

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