On 29 June 2013 11:09, Nick Coghlan <
ncoghlan@gmail.com> wrote:
Rather than adding a new keyword, we could simply expand the syntax
for the existing break statement to be this:
break [if <EXPR>]
...
Once the break statement has been redefined this way, it *then*
becomes reasonable to allow the following in comprehensions:
data = [x for x in iterable break if x is None]
Almost all of your proposal looks reasonable, but I personally find
this quite hard to read; it should be written along the lines of (I'm
not proposing this):
x for x in iterable; break if x is None
if one is to continue having syntax that is pseudo-correct English - a
trait I am eager to to keep.
In summary, this is hard for me to read because there is no separation
of the statements.
Because I have not other substantial objections, I'm -0 on this. If
you can find a way to "fix" that, I'll be, for all intents and
purposes, neutral.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.orghttp://mail.python.org/mailman/listinfo/python-ideas