On Fri, Feb 11, 2011 at 4:47 PM, Westley Martínez <aniko...@gmail.com> wrote: > No, too confusing. Then people'll want compound loops e.g.: > > for a in b if c while d else return x: > print('Ha ha I'm so clever!')
I've yet to see anybody arguing for while loops to be nested like that, but we already allow nested for loops in comprehensions and generator expressions: [(x, y) for x in a for y in b if c(y)] Why not allow the same thing in for-loop conditions? I think that anything that makes the language syntax more consistent is good. Cheers, Ian -- http://mail.python.org/mailman/listinfo/python-list