Returns a list of (key, value) pairs as 2-tuples.
3816
def items(self):
        ""
        return (list(self._pb.IntMap.items()) + list(self._pb.StringMap.items()) +
                list(self._pb.FloatMap.items()) + list(self._pb.BoolMap.items()))
1105345
def get_all(self) -> Iterable[Tuple[str, str]]:
        
        for name, values in self._as_list.items():
            for value in values:
                yield (name, value)
1107766
def get_value_tuple(self):
        
        retval = tuple()
        for val in self.VALUES:
            retval += (getattr(self, val),)
        return retval
281379
def asTuple(self):
        
        t = []
        k = sorted(self.keys())
        for key in k:
            t.append((key, self[key]))
        return tuple(t)
858581
def zip_dict(*dicts):
  """"""
  for key in set(itertools.chain(*dicts)):  # set merge all keys
    # Will raise KeyError if the dict don't have the same keys
    yield key, tuple(d[key] for d in dicts)
1070425
def tlist2dict(tuple_list,**kwargs):
    '''
        
    '''
    if('deepcopy' in kwargs):
        deepcopy = kwargs['deepcopy']
    else:
        deepcopy = 1
    if('check' in kwargs):
        check = kwargs['check']
    else:
        check = 1
    if(check):
        if(tltl.is_tlist(tuple_list)):
            pass
        else:
            return(None)
    else:
        pass
    j = {}
    if(deepcopy):
        new = copy.deepcopy(tuple_list)
    else:
        new = tuple_list
    for i in range(0,new.__len__()):
        temp = new[i]
        key = temp[0]
        value = temp[1]
        j[key] = value
    return(j)
220707
def _many_to_one(input_dict):
    """"""
    return dict((key, val)
                for keys, val in input_dict.items()
                for key in keys)
106155
public static <K, V> List<Tuple<K, V>> object(final List<K> keys, final List<V> values) {
        return map(keys, new Function<K, Tuple<K, V>>() {
            private int index;

            @Override
            public Tuple<K, V> apply(K key) {
                return Tuple.create(key, values.get(index++));
            }
        });
    }
467428
function kv2List( source ) {
        var list = [];
        for ( var key in source ) {
            if ( source.hasOwnProperty( key ) ) {
                list.push( {
                    k: key,
                    v: source[ key ]
                } );
            }
        }

        return list;
    }
763258
def items(self):
        ''''''
        return [(self.keys[x], self.values[x]) for x in range(len(self.keys))]
139350
function tuplesToStringTuples (tuples) {
  return tuples.map(tup => {
    const proto = protoFromTuple(tup)
    if (tup.length > 1) {
      return [proto.code, convert.toString(proto.code, tup[1])]
    }
    return [proto.code]
  })
}
115991
def _items(self) -> List[Tuple[str, JsonObjTypes]]:
        
        return [(k, self[k]) for k in self.__dict__.keys()]
44630
def split_pks(cols):
  """"""
  pks = []
  others = []
  for name, col in cols.items():
    if col["is_primary_key"] == "t":
      pks.append(name)
    else:
      others.append(name)

  return (tuple(pks), tuple(others))
250478
def getall(self, key):
        
        result = []
        for k, v in self._items:
            if key == k:
                result.append(v)
        return result
242692
function pairs(object) {
  return Object.keys(object).map(function(key){
    return { key: key, value: object[key] }
  })
}
1012458
def cartesian_lists(d):
    
    return [{k: v for k, v in zip(d.keys(), args)}
            for args in itertools.product(*d.values())]
298410
def keys_values(self):
        """"""
        keys_values = []
        for value in self.keys.values():
            if isinstance(value, list):
                keys_values += value
            elif isinstance(value, basestring) and not value.startswith('-'):
                # Avoid -99. Should be fixed in geozones
                keys_values.append(value)
            elif isinstance(value, int) and value >= 0:
                # Avoid -99. Should be fixed in geozones
                keys_values.append(str(value))
        return keys_values