def enumValueToNameLookup(type_, value_):
 retVal = None
 for (name, value) in getPublicTypeMembers(type_):
  if (value == value_):
   retVal = name
   break
 return retVal

def enumValueToNameLookup ( type_ , value_ ) : retVal = None for ( name , value ) in getPublicTypeMembers ( type_ ) : if ( value == value_ ) : retVal = name break return retVal
returns name of a enum member with a given value .