[Python-ideas] allow line break at operators

Devin Jeanpierre jeanpierreda at gmail.com
Thu Aug 11 23:29:36 CEST 2011

    a = b,
    c = d

is a pair of such statements.

Howeverm indentation errors have been extremely rare in my experience,
so I'm not really compelled to think it's harmful. Especially since
3.x outlaws mixing tabs and spaces.

I don't love it, but I guess I prefer it to throwing parentheses and
especially \ everywhere. Parentheses can be awkward and don't quite
work everywhere the way one might want, and \ has that trailing space


On Thu, Aug 11, 2011 at 5:21 PM, Bruce Leban <bruce at leapyear.org> wrote:
> On Thu, Aug 11, 2011 at 2:06 PM, Devin Jeanpierre <jeanpierreda at gmail.com>
> wrote:
>> Eek no. If I was suggesting anything, it would have been a third form
>> of continuation: collapsing subsequent extra-indented lines. This is
>> never ambiguous. (This could be done in such a way as to permit
>> comments, namely, by doing it to the tokenstream rather than to the
>> actual text)
> So if I miss-indent this
> a = b
>   (x, y) = z
> instead of getting "unexpected indent" I get "SyntaxError: can't assign to
> function call". I'm sure someone can come up with two valid statements that
> have a different meaning when spliced together.
> --- Bruce
> Follow me: http://www.twitter.com/Vroo http://www.vroospeak.com

More information about the Python-ideas mailing list