allow line break at operators

Chris Rebert clp2 at
Thu Aug 11 09:50:26 CEST 2011

On Thu, Aug 11, 2011 at 12:24 AM, Yingjie Lan <lanyjie at> wrote:
> From: Steven D'Aprano <steve+comp.lang.python at>
> On Thu, 11 Aug 2011 12:52 pm Yingjie Lan wrote:
>> :And if we require {} then truly free indentation should be OK too! But
>> :it wouldn't be Python any more.
>> Of course, but not the case with ';'. Currently ';' is optional in Python,
>> But '{' is used for dicts. Clearly, ';' and '{' are different in
>> magnitude.
>> So the decision is: shall we change ';' from optional to mandatory
>> to allow free line splitting?
> :Why on earth would you want to break backwards compatibility of millions of
> :Python scripts and programs, and require extra, unnecessary line-noise on
> :every single line of Python code, just so that you can occasionally avoid a
> :writing a pair of parentheses?
> I think allowing free line splitting (without parentheses -- that's
> artifitial and
> requires the coder to serve the machine rather than the other way around)
> with proper indentation will produce truely ergonomic code layout (well,
> assuming you also like properly indented code).
> And this can be done almost hassle-free for the coder.
> The trouble of adding a ';' to most of the lines can also be
> avoided by a smart editor (see my other reply).

The trouble of dealing with long lines can be avoided by a smart
editor. It's called line wrap.


More information about the Python-list mailing list