inveniosoftware / inveniosoftware/dictdiffer
Better control with swap, select which of (change/add/remove) to swap.
Open
Need: documentation
- Dominant language
- Python
- Stars
- 849
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
I want to only swap add / remove of the diff, not change positions on all changes.
Or if i only wanted to change positions on changes for an example.
Any way to implement this?
data_old contains more keys than data_new.
i want to keep these old keys in the patch, but change values for newer values.
```
result = diff(data_old, data_new)
result = swap(result, 'remove') # I want to only swap remove to add, and not swap all changes.
patched = patch(result, data_old)
assert patched == data_old
```
Contributor guide
Assessment
This issue has not been assessed yet.