def merge_dicts(*dicts, deleted_keys=[]):
    """Return a new dict from a list of dicts by repeated calls to update(). Keys in later
    dicts will override those in earlier ones. *deleted_keys* is a list of keys which should be
    deleted from the resulting dict.

    """
    rv = {}
    for d in dicts:
        rv.update(d)
    for k in deleted_keys:
        del rv[k]
    return rv