Merge list of 'key=val' strings into dict amap, warning of duplicate keys

def merge_keyvals_into_map(keyvals, amap):

    """Merge list of 'key=val' strings into dict amap, warning of duplicate keys"""

    for kv in keyvals:
        k,v = kv.split('=')
        if k in amap:
            logger.warn('overwriting {0} with {1}'.format(k, v))
        amap[k] = v