Heiko Wundram wrote: > def __iter__(self): > for e in self.data: > yield e Another option: >>> class Foo: ... def __init__(self): ... self.data = range(10) ... def __iter__(self): ... return iter(self.data) ... >>> for i in Foo(): ... print i, ... 0 1 2 3 4 5 6 7 8 9 >>> Peter