mecheye.shared.SwigPyIterator¶
- class mecheye.shared.SwigPyIterator(sequence, index=0, reverse=False, owner=None)¶
Provide index-based iterator operations without exposing native pointers.
- value()¶
Return the current element; raise StopIteration outside the container.
- incr(n=1)¶
Advance n elements in this iterator’s traversal direction and return self.
- decr(n=1)¶
Move n elements against this iterator’s traversal direction and return self.
- advance(n)¶
Advance by signed n elements and return self.
- distance(other)¶
Return the distance to other in the traversal direction.
- Raises:
ValueError – The iterators refer to different containers.
- equal(other)¶
Return whether both iterators refer to the same container and index.
- copy()¶
Return an independent iterator at the same position and direction.
- next()¶
Return the current element, then advance in the traversal direction.
- previous()¶
Move against the traversal direction, then return the element.