labpack/parsing/comparison.py
def _compare_set(new_set, old_set, change_list, root):

    '''
        a method for list changes made to a set

    :param new_set: set with new values
    :param old_set: set with old values
    :param change_list: list of differences between old and new
    :patam root: string with record of path to the root of the main object
    :return: list of differences between old and new
    '''

    from copy import deepcopy
    path = deepcopy(root)
    missing_items = old_set - new_set
    extra_items = new_set - old_set
    for item in missing_items:
        change_list.append({'action': 'REMOVE', 'key': None, 'value': item, 'path': path})
    for item in extra_items:
        change_list.append({'action': 'ADD', 'key': None, 'value': item, 'path': path})
    return change_list

        a method for list changes made to a set

    :param new_set: set with new values
    :param old_set: set with old values
    :param change_list: list of differences between old and new
    :patam root: string with record of path to the root of the main object
    :return: list of differences between old and new
    
a method for list changes made to a set
a method for list changes made to a set
def _compare_set(new_set, old_set, change_list, root):
    from copy import deepcopy
    path = deepcopy(root)
    missing_items = old_set - new_set
    extra_items = new_set - old_set
    for item in missing_items:
        change_list.append({'action': 'REMOVE', 'key': None, 'value': item, 'path': path})
    for item in extra_items:
        change_list.append({'action': 'ADD', 'key': None, 'value': item, 'path': path})
    return change_list
def _compare_set ( new_set , old_set , change_list , root ) : from copy import deepcopy path = deepcopy ( root ) missing_items = old_set - new_set extra_items = new_set - old_set for item in missing_items : change_list . append ( { 'action' : 'REMOVE' , 'key' : None , 'value' : item , 'path' : path } ) for item in extra_items : change_list . append ( { 'action' : 'ADD' , 'key' : None , 'value' : item , 'path' : path } ) return change_list
a method for list changes made to a set
a method for list changes made to a set
'''
        a method for list changes made to a set

    :param new_set: set with new values
    :param old_set: set with old values
    :param change_list: list of differences between old and new
    :patam root: string with record of path to the root of the main object
    :return: list of differences between old and new
    '''
list of differences between old and new
list of differences between old and new
new_set
set with new values
set with new values
old_set
set with old values
set with old values
change_list
list of differences between old and new
list of differences between old and new
root
patam
string with record of path to the root of the main object
string with record of path to the root of the main object