def __names_from_dicts(lod, optional=True):
 results = []
 if optional:
  results.append('<<None>>')
 for x in lod:
  results.append(x['name'])
 results.sort()
 return results

def __names_from_dicts ( lod , optional = True ) : results = [ ] if optional : results . append ( '<<None>>' ) for x in lod : results . append ( x [ 'name' ] ) results . sort ( ) return results
tiny helper function .