<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Steven D'Aprano <steve+comp.lang.python@pearwood.info><br><b><span style="font-weight: bold;">To:</span></b> python-list@python.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, August 11, 2011 12:18 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: allow line break at operators<br></font><br>On Thu, 11 Aug 2011 12:52 pm Yingjie Lan wrote:<br><br>> :And if we require {} then truly free indentation should be OK too! But<br>> <br>> :it wouldn't be Python any more.<br>> <br>> Of course, but not the case with ';'. Currently ';' is optional in
Python,<br>> But '{' is used for dicts. Clearly, ';' and '{' are different in<br>> magnitude.<br>> <br>> So the decision is: shall we change ';' from optional to mandatory<br>> to allow free line splitting?<br><br>:Why on earth would you want to break backwards compatibility of millions of<br>:Python scripts and programs, and require extra, unnecessary line-noise on<br>:every single line of Python code, just so that you can occasionally avoid a<br>:writing a pair of parentheses?<br><br>I think allowing free line splitting (without parentheses -- that's artifitial and <br>requires the coder to serve the machine rather than the other way around)<br>with proper indentation will produce truely ergonomic code layout (well,<br>assuming you also like properly indented code). <br><br>And this can be done almost hassle-free for the coder. <br><br>The compatibility problem can be solved by something like a preprocessor <br>indicator to opt in this
new language feature, or, if we are determined to favor<br>this new feature, all old code can be easily converted. The worst case is<br>that the coder has to opt in.<br><br>The trouble of adding a ';' to most of the lines can also be <br>avoided by a smart editor (see my other reply).<br><br>Python serves the coder, not the other way around. <br><br>Cheers,<br><br>Yingjie<br></div></div></div></body></html>