You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we're going to change this, 6.0 might be a good release to do it in. It's technically a backwards-compatibility break, but it's one that's unlikely to affect much real code (deleting slices with a step != 1 is rare).
Note that this is not just about __delitem__, but about slice assignment, too:
TraitListObject.__delitem__
handles slices with steps !=1 specially:traits/traits/trait_list_object.py
Lines 188 to 190 in d8d851e
This produces e.g.
[[9, 5]]
instead of[9, 5]
for theremoved
part of the event on these lines:traits/traits/tests/test_traits.py
Lines 1114 to 1115 in d8d851e
This doesn't match the behaviour found when e.g. list items are changed:
traits/traits/tests/test_traits.py
Lines 1104 to 1105 in d8d851e
Discussed offline, the current behaviour is intentional to reproduce legacy results
The text was updated successfully, but these errors were encountered: