-
Notifications
You must be signed in to change notification settings - Fork 97
Labels
Description
Package version (if known): 0.9.0
Describe the bug
There seems to be an error when more than two items are deleted from a list:
import dictdiffer
before = [{"idx": 1}, {"idx": 2}, {"idx": 3}, {"idx": 4}]
after = [{"idx": 1}]
dd = dictdiffer.diff(before, after)
print(dictdiffer.revert(dd, after))
prints
[{'idx': 1}, {'idx': 2}, {'idx': 4}, {'idx': 3}]
Steps to Reproduce
Try the code above.
Expected behavior
It should print
[{'idx': 1}, {'idx': 2}, {'idx': 3}, {'idx': 4}]
Additional context
It seems to occur only if more than 2 items are deleted - for 1 or 2 deleted items everything works fine.