[Python-ideas] Allow parentheses to be used with "with" block
Paul Moore
p.f.moore at gmail.com
Mon Feb 16 15:13:03 CET 2015
On 16 February 2015 at 13:47, Chris Angelico <rosuav at gmail.com> wrote:
> That said, I'm not sure how this would be implemented, as I don't know
> enough about the grammar. I can explain it to a human no trouble ("you
> can continue an expression onto a new line by simply ending with an
> operator and indenting the next line"), but it might be hard to
> explain to a computer. For one thing, this version of the proposal
> requires that indentation matter to the parsing of an expression,
> which currently it doesn't - you can open a bracket, then put the rest
> of the expression flush left, if you want to.
It seems to me that we're talking here about replacing a slightly ugly
but explicit and already existing construct (backslash continuation)
with something that seems to be pretty difficult to agree on and/or
explain (depending on the proposal).
It might be worth remembering that the original post was asking for an
alternative to backslashes *because the Google guidelines prohibit
them*. Surely the obvious answer is to change the Google guidelines?
Paul
More information about the Python-ideas
mailing list