socrate/conf.py
def merge(*objects):
    """ Merge simple python objects, which only consist of
    strings, integers, bools, lists and dicts
    """
    mode = type(objects[0])
    if not all(type(obj) is mode for obj in objects):
        raise ValueError("Cannot merge mixed typed objects")
    if len(objects) == 1:
        return objects[0]
    elif mode is dict:
        return {
            key: merge(*[obj[key] for obj in objects if key in obj])
            for obj in objects for key in obj.keys()
        }
    elif mode is list:
        return sum(objects, [])
    else:
        raise ValueError("Cannot merge objects of type {}: {}".format(
            mode, objects))
 Merge simple python objects, which only consist of
    strings, integers, bools, lists and dicts
    
Merge simple python objects, which only consist of
strings, integers, bools, lists and dicts
Merge simple python objects which only consist of strings integers bools lists and dicts
def merge(*objects):
    mode = type(objects[0])
    if not all(type(obj) is mode for obj in objects):
        raise ValueError("Cannot merge mixed typed objects")
    if len(objects) == 1:
        return objects[0]
    elif mode is dict:
        return {
            key: merge(*[obj[key] for obj in objects if key in obj])
            for obj in objects for key in obj.keys()
        }
    elif mode is list:
        return sum(objects, [])
    else:
        raise ValueError("Cannot merge objects of type {}: {}".format(
            mode, objects))
def merge ( * objects ) : mode = type ( objects [ 0 ] ) if not all ( type ( obj ) is mode for obj in objects ) : raise ValueError ( "Cannot merge mixed typed objects" ) if len ( objects ) == 1 : return objects [ 0 ] elif mode is dict : return { key : merge ( * [ obj [ key ] for obj in objects if key in obj ] ) for obj in objects for key in obj . keys ( ) } elif mode is list : return sum ( objects , [ ] ) else : raise ValueError ( "Cannot merge objects of type {}: {}" . format ( mode , objects ) )
Merge simple python objects, which only consist of
strings, integers, bools, lists and dicts
Merge simple python objects which only consist of strings integers bools lists and dicts
""" Merge simple python objects, which only consist of
    strings, integers, bools, lists and dicts
    """