[Python-ideas] with statement syntax forces ugly line breaks?
g.brandl at gmx.net
Thu Sep 9 14:08:25 CEST 2010
Am 09.09.2010 01:19, schrieb Greg Ewing:
> MRAB wrote:
>> On 08/09/2010 22:30, Nick Coghlan wrote:
>>> I've sometimes wondered if we should consider the idea of making line
>>> continuation implicit between keywords and their associated colons.
>> If a colon was omitted by mistake, how much later would the parser
>> report a syntax error?
> It might be best to allow this only if the continuation
> lines are indented at least as far as the starting line.
That is dangerous, it makes the whitespace rules more complicated.
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.
More information about the Python-ideas