From 0822eea37291a7b83327f11ebe4f52a0698d3a77 Mon Sep 17 00:00:00 2001 From: Taylor Steinberg Date: Mon, 4 Nov 2024 14:37:28 -0500 Subject: [PATCH] feat: adds __iter__ method support to ActiveSequence (#321) --- src/posit/connect/resources.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/posit/connect/resources.py b/src/posit/connect/resources.py index 6cdb628f..2e54ecc2 100644 --- a/src/posit/connect/resources.py +++ b/src/posit/connect/resources.py @@ -162,6 +162,9 @@ def __getitem__(self, index: slice) -> Sequence[T]: ... def __getitem__(self, index): return self._data[index] + def __iter__(self): + return iter(self._data) + def __len__(self) -> int: return len(self._data)