Wrapping a class in an iterator
class AlwaysFive: def __iter__(self): while True: yield 5 a = AlwaysFive() it = iter(a)