<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span><font class="Apple-style-span" size="3">I agree that long lines of code are not very common in many projects, though it might be the case with some heavily involved in math. For some reason, when the feature of free line breaking came about in computer languages, it is welcomed and generally well accepted. Python uses indentation for blocks, and by the same mechanism, line breaking can be </font>accommodated without requiring parenthesis or ending backslashes<font class="Apple-style-span" size="3">.</font></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">For the tuning, yes, people would disagree on how to split expressions/code. The continue-by-indentation would allow people to break a line in whatever
 way that pleases their aesthetic taste, as long as there is an indentation. Most people seems to like an indentation on the continuing lines, probably for a visual indication of a continuation line. Some general guidelines may be provided, but there is no need for other hard rules on breaking lines, except that an identifier should never be split apart.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">For the implementation, I don't have much clue. At least on the parser, it needs to look beyond the linefeed to determine if a line is completed. If the indentation is defined as a single symbol, then it would only require a one-step look-ahead, and that should not be hard.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></div><div><font class="Apple-style-span" size="3">Again, my </font>apology<font
 class="Apple-style-span" size="3"> for top posting.</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Stephen J. Turnbull <stephen@xemacs.org><br><b><span style="font-weight: bold;">To:</span></b> Yingjie Lan <lanyjie@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> Gabriel AHTUNE <gahtune@gmail.com>; Matt Joiner <anacrolix@gmail.com>; "python-list@python.org" <python-list@python.org>; python-ideas <python-ideas@python.org><br><b><span style="font-weight: bold;">Sent:</span></b> Saturday, September 3, 2011 2:10
 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Python-ideas] allow line break at operators<br></font><br>Yingjie Lan writes:<br><br> > Have you considered line continuation by indentation? It seems to<br> > meet the design principle. I think it is the most natural way to<br> > allow free line breaking in Python.<br><br>Briefly, yes, and I think it would need a lot of tuning and probably<br>complex rules.  Unlike statements, where everybody (except the judges<br>of the Obfuscated C Contest) agrees on a simple rule: "In a control<br>structure, the controlled suite should be uniformly indented one<br>level", line breaking and indentation of long expressions is an art,<br>and people have different opinions on "readability" and "beauty."<br>Achieving a compromise that is workable even for a few major styles is<br>likely to be annoying and bug-prone.<br><br>Pretty much every program I write seems to have a continued list
 of<br>data or a multi-line dictionary display as data.  It's not unusual for<br>me to comment the formal arguments in a function definition, or the<br>parent classes of a class definition.  The exception for parenthesized<br>objects is something I depend on for what I consider good style.  Of<br>course I could use explicit continuation, but in a long table that's<br>ugly and error-prone.<br><br>Long expressions that need to be broken across lines, on the other<br>hand, often indication that I haven't thought carefully enough about<br>that component of the program, and an extra pair of parentheses or a<br>terminal backslash just isn't that "heavy" or ugly in the context of<br>such long expressions.  For me, they're also pretty rare; many<br>programs I write have no explicit continuations in them at all.<br><br>YMMV, of course, but I find the compromise that Python arrived at to<br>be very useful, and I must suppose that it was
 substantially easier to<br>implement than "fully free" line breaking (whatever that means to you).<br><br><br></div></div></blockquote></div></div></body></html>