def get_attribute(obj, name):
 try:
  attribute = getattr(obj, name)
 except AttributeError:
  raise unittest.SkipTest(('module %s has no attribute %s' % (obj.__name__, name)))
 else:
  return attribute

def get_attribute ( obj , name ) : try : attribute = getattr ( obj , name ) except AttributeError : raise unittest . SkipTest ( ( 'module %s has no attribute %s' % ( obj . __name__ , name ) ) ) else : return attribute
like getattr .