Remove containing list around added and removed items in some list events #771
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #742
Updates the behaviour of list events when setting or deleting list objects via a slice with step size != 1.
Previously the added and deleted elements would be wrapped in an extra containing list:
traits/traits/tests/test_traits.py
Lines 1110 to 1115 in d8d851e
This PR removes this containing list to bring the behaviour more in line with that of other list actions.
Note there is still some bugwards-compatibility code in
TraitListObject
's__setitem__
and__delitem__
that is out-of-scope of this PR: theindex
of certain events is 0 in cases where the expectation would be a slice:traits/traits/tests/test_traits.py
Lines 1100 to 1105 in d8d851e
Opened #772 for that.