def __iter__(self):
        """Return an iterator over all items - consumes the generator."""
        self.__idx = 0
        self.__len = self.__size()
        return self
Return an iterator over all items - consumes the generator.
recipes/Python/534114_List_wrapper_generators_indexable/recipe-534114.py