PHP supports the iterator pattern via the Iterator interface, as part of the standard distribution. An iterable has an codice 50 method that returns an iterator object. In Python, a generator is an iterator constructor&colon; a function that returns an iterator. Functions for traversal and retrieval are put into the abstract Iterator interface. But no explicit iterator object is subsequently exposed as the iteration proceeds. An iterator is behaviorally similar to a database cursor. The Symbol wrapper also provides access to a variable free iterator. A loop counter is sometimes also referred to as a loop iterator. In C++ language, we say that an iterator models the iterator concept. In the for loop we see an invocation of codice 4 which is an iterator. A for-each loop is essentially equivalent to an iterator. Objects may be accessed directly or with an iterator. Different languages or libraries used with these languages define iterator types. Python hides essentially all of the details using the iterator protocol. This is an implementation of the Iterator pattern.