+0.5 The "trailing \" workaround is nonobvious. Wrapping in () is noisy and already heavily used by other syntactical structures. Since a final ':' is needed anyway, i think this would be great.
if a and b or c: do stuff() On Thu, Aug 11, 2011 at 11:02 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: > On 11/08/2011 05:16, Chris Rebert wrote: >> >> On Wed, Aug 10, 2011 at 7:52 PM, Yingjie Lan<lany...@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. > _______________________________________________ > Python-ideas mailing list > python-id...@python.org > http://mail.python.org/mailman/listinfo/python-ideas > -- http://mail.python.org/mailman/listinfo/python-list