[Python-ideas] with statement syntax forces ugly line breaks?

Nick Coghlan ncoghlan at gmail.com
Wed Sep 8 23:30:26 CEST 2010

On Thu, Sep 9, 2010 at 4:07 AM, Georg Brandl <g.brandl at gmx.net> wrote:
> In addition to the backslash hint already given, I'd like to explain why
> this version isn't allowed: the parser couldn't distinguish between a
> multi-context with and an expression in parentheses.
> (In the case of import, where parens can be used around the import list,
> this is different, no arbitrary expression is allowed.)

I've sometimes wondered if we should consider the idea of making line
continuation implicit between keywords and their associated colons.
I've never seriously investigated the implications for the parser,


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list