(dict_list, new_entry, key, force_insertion=False)
return dict_list
Insert new_entry (which must be a dict) into a sorted list of other dicts.
    If force_insertion is True, new_entry will NOT overwrite an existing entry
    with the same key.
    Returns the new list, which is still sorted.
Insert new_entry (which must be a dict) into a sorted list of other dicts.
    If force_insertion is True, new_entry will NOT overwrite an existing entry
    with the same key.
    Returns the new list, which is still sorted.
Insert new_entry ( which must be a dict ) into a sorted list of other dicts . If force_insertion is True new_entry will NOT overwrite an existing entry with the same key . Returns the new list which is still sorted .
def insert_sorted_dict_list(dict_list, new_entry, key, force_insertion=False):
    """
    Insert new_entry (which must be a dict) into a sorted list of other dicts.
    If force_insertion is True, new_entry will NOT overwrite an existing entry
    with the same key.
    Returns the new list, which is still sorted.
    """
    for index, entry in enumerate(dict_list):
        if not entry:
            continue
        if entry[key] == new_entry[key] and not force_insertion:
            dict_list[index] = dict_merge(entry, new_entry)
            return dict_list
        if entry[key] > new_entry[key]:
            dict_list.insert(index, new_entry)
            return dict_list
    dict_list = dict_list + [new_entry]
    return dict_list
def insert_sorted_dict_list ( dict_list , new_entry , key , force_insertion = False ) : for index , entry in enumerate ( dict_list ) : if not entry : continue if entry [ key ] == new_entry [ key ] and not force_insertion : dict_list [ index ] = dict_merge ( entry , new_entry ) return dict_list if entry [ key ] > new_entry [ key ] : dict_list . insert ( index , new_entry ) return dict_list dict_list = dict_list + [ new_entry ] return dict_list