(even the title of this is going to cause flames, I realize)
Python made the deliberate design choice to have the for loop use explicit iterables, with
for
Heh:
def forre(a,i,c,top,increment,run): increment = increment.replace("++","+=1").replace("--","-=1").replace("; ","") while i != top: try: exec(run) except: print "error: "; print run try: exec(increment) except: print "error: "; print increment forre("int i=",0,"; i<",6,"; i++", "print i" )