Iterator extension done to copy xrange() functionality