def attributes_checker(item, attributes=None):
 try:
  attrgetter(*attributes)(item)
  return True
 except AttributeError:
  return False

def attributes_checker ( item , attributes = None ) : try : attrgetter ( * attributes ) ( item ) return True except AttributeError : return False
checks if the given list of attributes exist .