Return a list of (REALNAME, EMAIL) for each fieldvalue.
352999
def getaddresses(fieldvalues):
    """"""
    all = COMMASPACE.join(fieldvalues)
    a = _AddressList(all)
    return a.addresslist
1255585
def __objecthasfields(bunchdt, data, commdct, idfobject, places=7, **kwargs):
    """"""
    for key, value in list(kwargs.items()):
        if not isfieldvalue(
                bunchdt, data, commdct,
                idfobject, key, value, places=places):
            return False
    return True
913847
def getAllValuesForFieldsAsPrettyJSON( dbid, fieldNames = nil, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
     ret = getAllValuesForFieldsAsArray(dbid,fieldNames,query,qid,qname,clist,slist,fmt,options)
     ret = JSON.pretty_generate(ret) if ret
   end
250269
def get_field_mro(cls, field_name):
    """"""
    res = set()
    if hasattr(cls, '__mro__'):
        for _class in inspect.getmro(cls):
            values_ = getattr(_class, field_name, None)
            if values_ is not None:
                res = res.union(set(make_list(values_)))
    return res
471034
def values(self):
        """"""
        values = []
        for __, data in self.items():
            values.append(data)
        return values
1084238
def getAllValuesForFieldsAsArray( dbid, fieldNames = nil, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
      ret = []
      valuesForFields = getAllValuesForFields(dbid, fieldNames, query, qid, qname, clist, slist,fmt,options)
      if valuesForFields
         fieldNames ||= getFieldNames(@dbid) 
         if fieldNames and fieldNames[0]
            ret = Array.new(valuesForFields[fieldNames[0]].length) 
            fieldType = {}
            fieldNames.each{|field|fieldType[field]=lookupFieldTypeByName(field)}
            valuesForFields.each{ |field,values|
               values.each_index { |i| 
                  ret[i] ||= {} 
                  ret[i][field]=formatFieldValue(values[i],fieldType[field])
               }
            }
         end
      end
      ret
   end
545484
def email_list_to_email_dict(email_list):
    """"""
    if email_list is None:
        return {}
    result = {}
    for value in email_list:
        realname, address = email.utils.parseaddr(value)
        result[address] = realname if realname and address else address
    return result
1066459
def getAllValuesForFieldsAsJSON( dbid, fieldNames = nil, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
     ret = getAllValuesForFieldsAsArray(dbid,fieldNames,query,qid,qname,clist,slist,fmt,options)
     ret = JSON.generate(ret) if ret
   end
784898
def fields(self, value):
        """"""
        if type(value) is list:
            self._fields = value
        else:
            raise TypeError("Input must be a list")
1099809
def get_field_mappings(self, field):
        """"""
        retdict = {}
        retdict['indexed'] = False
        retdict['analyzed'] = False
        for (key, val) in iteritems(field):
            if key in self.mappings:
                if (key == 'type' and
                    (val == "long" or
                     val == "integer" or
                     val == "double" or
                     val == "float")):
                    val = "number"
                # self.pr_dbg("\t\t\tkey: %s" % key)
                # self.pr_dbg("\t\t\t\tval: %s" % val)
                retdict[key] = val
            if key == 'index' and val != "no":
                retdict['indexed'] = True
                # self.pr_dbg("\t\t\tkey: %s" % key)
                # self.pr_dbg("\t\t\t\tval: %s" % val)
                if val == "analyzed":
                    retdict['analyzed'] = True
        return retdict
775058
def get_fields(cls, inlcude_base=False, include_id=False):
        """"""
        for field in cls._meta.fields:
            if field.name == 'deleted':
                continue
            if not include_id and field.name == 'id':
                continue
            if not inlcude_base and field.name in ['created_at', 'updated_at']:
                continue
            yield field
443211
def by_field_names
      field_names_string = params["field_names"] || ""
      # "property-origins, property-types, property-states, provinces"

      # below used to populate dropdown list to select
      # client for property
      # if field_names_string == "clients"
      #   clients_array = [{:value => "", :label => ""}]
      #   # TODO - have some filter for below
      #   clients = Client.all
      #   clients.each do |client|
      #     clients_array.push( {:value => client.id,
      #                          :label => client.full_name})
      #   end
      #   return render json: { clients: clients_array}
      # end

      field_names_array = field_names_string.split(",")
      # above might return something like
      # ["extras"] or
      # ["provinces","property-states"]
      select_values = {}
      # a field_name_id identifies a dropdown field for
      # which I need a list of translation keys
      # for example extras
      field_names_array.each do |field_name_id|
        # a field_name_id might be:
        # extras
        field_name_id = field_name_id.strip

        # gets a list of translation keys for a given field:
        translation_keys = FieldKey.where(tag: field_name_id).visible.pluck("global_key")
        select_values[field_name_id] = translation_keys
      end
      render json: select_values
    end
395759
def _values(metadata, rel):
    """"""
    result = []
    for r in metadata:
        if(r[REL] == rel):
            result.append(r[VAL])

    return result
850846
def fields_with_locales(self):
        

        result = {}
        for locale, fields in self._fields.items():
            for k, v in fields.items():
                real_field_id = self._real_field_id_for(k)
                if real_field_id not in result:
                    result[real_field_id] = {}
                result[real_field_id][locale] = self._serialize_value(v)
        return result
36968
function() {
	   var values = [];
	   for(var i = 0 ; i < this.subFields.length ; i++) {
	      values[i] = this.subFields[i].getValue();
	   }
	   return values;
	}
222761
def get_pks(self, field_vals):
        """"""
        field_name = self.schema.pk.name
        return self.in_field(field_name, field_vals).get()
633533
def repeatingfieldsnames(fields):
    """"""
    fnames = [field['field'][0] for field in fields]
    fnames = [bunchhelpers.onlylegalchar(fname) for fname in fnames]
    fnames = [fname for fname in fnames if bunchhelpers.intinlist(fname.split())]
    fnames = [(bunchhelpers.replaceint(fname), None) for fname in fnames]
    dct = dict(fnames)
    repnames = fnames[:len(list(dct.keys()))]
    return repnames