src/json_analysis.py
def merge_list(this, other, cb, comp=lambda o: type(o)):
    """
    Merge two lists by their children's type,
    for each given list, their children must be unique in type.
    :param this:
    :param other:
    :param cb:
    :param comp: a function to get children's type, defaults to type()
    :return:
    """

    # assert isinstance(this, list)
    # assert isinstance(other, list)

    result = []
    dict_this = list_to_dict(this, comp)
    dict_other = list_to_dict(other, comp)

    ret = merge_dict(dict_this, dict_other, cb)
    for value in ret.values():
        result.append(value)

    return result

    Merge two lists by their children's type,
    for each given list, their children must be unique in type.
    :param this:
    :param other:
    :param cb:
    :param comp: a function to get children's type, defaults to type()
    :return:
    
Merge two lists by their children's type,
for each given list, their children must be unique in type.
Merge two lists by their children ' s type for each given list their children must be unique in type .
def merge_list(this, other, cb, comp=lambda o: type(o)):
    result = []
    dict_this = list_to_dict(this, comp)
    dict_other = list_to_dict(other, comp)
    ret = merge_dict(dict_this, dict_other, cb)
    for value in ret.values():
        result.append(value)
    return result
def merge_list ( this , other , cb , comp = lambda o : type ( o ) ) : result = [ ] dict_this = list_to_dict ( this , comp ) dict_other = list_to_dict ( other , comp ) ret = merge_dict ( dict_this , dict_other , cb ) for value in ret . values ( ) : result . append ( value ) return result
Merge two lists by their children's type,
for each given list, their children must be unique in type.
Merge two lists by their children ' s type for each given list their children must be unique in type .
"""
    Merge two lists by their children's type,
    for each given list, their children must be unique in type.
    :param this:
    :param other:
    :param cb:
    :param comp: a function to get children's type, defaults to type()
    :return:
    """ # assert isinstance(this, list) # assert isinstance(other, list)
None
this
None
other
None
cb
None
comp
a function to get children's type, defaults to type()
a function to get children ' s type defaults to type ()
type()