def to_names(domain_obj_list):
 objs = []
 for obj in domain_obj_list:
  objs.append((obj.name if obj else None))
 return objs

def to_names ( domain_obj_list ) : objs = [ ] for obj in domain_obj_list : objs . append ( ( obj . name if obj else None ) ) return objs
takes a list of domain objects and returns a corresponding list of their names .