def acquireAttribute(objects, attr, default=_DEFAULT):
 for obj in objects:
  if hasattr(obj, attr):
   return getattr(obj, attr)
 if (default is not _DEFAULT):
  return default
 raise AttributeError(('attribute %r not found in %r' % (attr, objects)))

def acquireAttribute ( objects , attr , default = _DEFAULT ) : for obj in objects : if hasattr ( obj , attr ) : return getattr ( obj , attr ) if ( default is not _DEFAULT ) : return default raise AttributeError ( ( 'attribute %r not found in %r' % ( attr , objects ) ) )
go through the list objects sequentially until we find one which has attribute attr .