def full_dict(ldict, keys):
    """Return Comparison Dictionaries
       from list dict on keys
       keys: a list of keys that when
       combined make the row in the list unique
    """
    if type(keys) == str:
        keys = [keys]
    else:
        keys = keys

    cmp_dict = {}
    for line in ldict:
        index = []
        for key in keys:
            index.append(str(line.get(key, '')))
        index = '-'.join(index)
        cmp_dict[index] = line

    return cmp_dict
def full_dict ( ldict , keys ) : if type ( keys ) == str : keys = [ keys ] else : keys = keys cmp_dict = { } for line in ldict : index = [ ] for key in keys : index . append ( str ( line . get ( key , '' ) ) ) index = '-' . join ( index ) cmp_dict [ index ] = line return cmp_dict
Return Comparison Dictionaries
       from list dict on keys
       keys: a list of keys that when
       combined make the row in the list unique