da_rosser at yahoo.com (Doug Rosser) wrote in message news:<e08cd05f.0409101235.50b1f8f3 at posting.google.com>... > class Cycle(object): > [snip] def cycle(inputList): while True: for item in inputList: yield item Or, as others have pointed out, there's an itertools.cycle that does the same thing, at least in Python 2.3 and up.