inveniosoftware / inveniosoftware/dictdiffer

Wrong diff in case of removing a non last index of an array

Open
#100 4 comments 3 reactions 0 assignees View on GitHub
Type: enhancement
Dominant language
Python
Stars
849
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Suppose we have an array

```python
old = ['a','b','c']
new = ['b','c']

# In this case I figured from the documentation that you should expect
# the diff to be ('remove','',[(0,'a')])

# but instead I'm getting:
[('change', [0], ('a', 'b')), ('change', [1], ('b', 'c')), ('remove', '', [(2, 'c')])]
```

Is that an error or did I misinterpret the usage of the library?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.