iterobj
Iterobj is a term used to denote an iterator object in a programming language. It represents the runtime state of an ongoing traversal over a collection and yields values one at a time as the traversal advances. An iterobj is typically created by requesting an iterator from an iterable or generator, and it maintains internal state such as the current position in the sequence.
In Python, an iterobj implements the iterator protocol by defining __iter__ (which returns self) and __next__ (which
Usage of an iterobj is characterized by lazy evaluation and statefulness. It may be finite or infinite
Examples illustrate the concept across languages. In Python, a generator yields values and an external consumer
See also: Iterator protocol, Iterable, Generator, Enumerator. Iterobj is a broad, language-agnostic label for an object