![](https://secure.gravatar.com/avatar/3b93c8471f584d466a4005bf32cf02c5.jpg?s=120&d=mm&r=g)
On 1 July 2013 16:21, Shane Green <shane@umbrellacode.com> wrote:
Having a bit of a hard time following the status of this as I dropped out
One thing I could see doing would be to allow semi-colons anywhere in a
for a while, but I’m not really for the semi-colon separator approach. Of all the options already available in list comprehensions, this one actually seems to be one of the most easily because it starts with a keyword and ends at the end. Not that syntax highlighting should be taken into account in general, it’s worth noting the syntax highlighted version really makes this distinction quite clear: <IMG> That's somewhat convincing. I'm still not convinced we need new syntax though. \ list comprehension that’s a boundary between statements of the expanded form.
Then they behave just like the optional semi-colons you could put at the
end of a line.
Sorry if that’s precisely what’s been promoted. .
So (I'm just adding examples to your idea): [item for sublist in data for item in sublist; if item] can become [item; for sublist in data; for item in sublist; if item] In a pathological case this is a transform from: [item for sublist in data if sublist for item in sublist if item%3 if item-1] to [item for sublist in data; if sublist; for item in sublist; if item%3; if item-1] But you can always do: [item for sublist in data if sublist for item in sublist if item%3 if item-1] That said, it's not like people *do* those sorts of pathological expressions, is it?