allow line break at operators

MRAB python at mrabarnett.plus.com
Thu Aug 11 09:03:22 EDT 2011


On 11/08/2011 05:16, Chris Rebert wrote:
> On Wed, Aug 10, 2011 at 7:52 PM, Yingjie Lan<lanyjie at yahoo.com>  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,
>
> I think of it more as that Python deigns to permit semicolons.
>
>> 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?
>
> Hell no, considering that the sizable majority of lines *aren't*
> split, which makes those semicolons completely redundant to their
> accompanying newlines. We'd be practicing poor Huffman coding by
> optimizing for the *un*common case. It would also add punctuational
> noise to what is otherwise an amazingly clean and readable syntax.
> Accidental semicolon omission is (IMO) the most irritating source of
> syntax (and, inadvertently, sometimes other more serious) errors in
> curly-braced programming languages.
>
+1
> Such a core syntax feature is not going to be changed lightly (or likely ever).
>
I'm glad to hear that. :-)

Although Python's use of indentation has its downside, we gain much
more then we lose, IMHO.



More information about the Python-list mailing list