
21 Feb
2014
21 Feb
'14
12:24 p.m.
I'm not sure if it is the goal to be able to break out of any level of nesting or at least that's not how I interpreted the original proposal. It is what happens for this stop() function but only because there's no other way.
As I'm reading it, the while clause would be evaluated once for each iteration of the innermost loop, and would be able to access the current values of every loop.
*ls = [ line for file in files for line in file while file or line ]*
...would become...
ls = [] for file in files: for line in file: if not (file or line): break # break if not while_expression * ls.append(line)*