Change Set Computations
Module: ppc_robot_lib.utils.changes
- class ItemAddition(insert_index, new_list_index)
Create new instance of ItemAddition(insert_index, new_list_index)
- insert_index
Alias for field number 0
- new_list_index
Alias for field number 1
- class ItemDeletion(deletion_index)
Create new instance of ItemDeletion(deletion_index,)
- deletion_index
Alias for field number 0
- compute_list_changes(new_list, original_list)[source]
Computes a list of changes that has to be performed on
original_list
to transform it tonew_list
. Equivalence of items is determined using the==
operator.This method can be used on table headers to compute which columns needs to be removed and which needs to be added.
The operations must be performed in the following order:
Perform all deletions in the given order.
Add all columns in the given order.
- Parameters:
- Return type:
- Returns:
Tuple containing
(list_of_deletions, list_of_additions)