# Safely swapping items in a Ignition Perspective list-like type

**URL:** <https://forum.inductiveautomation.com/t/safely-swapping-items-in-a-ignition-perspective-list-like-type/96918>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [October 7, 2024, 4:54pm UTC](https://forum.inductiveautomation.com/t/safely-swapping-items-in-a-ignition-perspective-list-like-type/96918 "2024-10-07T16:54:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 7, 2024, 4:54pm UTC](https://forum.inductiveautomation.com/t/safely-swapping-items-in-a-ignition-perspective-list-like-type/96918/1 "2024-10-07T16:54:20Z")

</div>

We are rearranging items in a list-like property in Perspective. I think the actual type is `ArrayWrapper`.

One of our bits of code needs to swap two items, and we'd like it to be as close to "atomic" as possible since other things are bound to the list. We're currently using this Python idiom to do it:

```python
self.view.custom.foo[i], self.view.custom.foo[j] = self.view.custom.foo[j], self.view.custom.foo[i]

```

It appears to be working but is making me itch that this could bite us in the butt some day. Will the Ignition Perspective types be sane behind the scenes? Could this trigger double updates of other things bound to the list?
