Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
An overwriting resolver for merge conflicts. Calls L{defaultMergeResolve},
but where a "mismatch" is detected, returns "overwrite" instead.

@param map1: The map being merged into.
@type map1: L{Mapping}.
@param map2: The map being used as the merge operand.
@type map2: L{Mapping}.
@param key: The key in map2 (which also exists in map1).
@type key: str

        def overwriteMergeResolve(map1, map2, key):
    """
    An overwriting resolver for merge conflicts. Calls L{defaultMergeResolve},
    but where a "mismatch" is detected, returns "overwrite" instead.

    @param map1: The map being merged into.
    @type map1: L{Mapping}.
    @param map2: The map being used as the merge operand.
    @type map2: L{Mapping}.
    @param key: The key in map2 (which also exists in map1).
    @type key: str
    """
    rv = defaultMergeResolve(map1, map2, key)
    if rv == "mismatch":
        rv = "overwrite"
    return rv
        


src/c/o/config-0.3.9/test_config.py   config(Download)
        def customMergeResolve(map1, map2, key):
            if key == "value3":
                rv = "overwrite"
            else:
                rv = config.overwriteMergeResolve(map1, map2, key)