allow line break at operators

Yingjie Lan lanyjie at
Thu Aug 11 03:01:28 EDT 2011

From: Michael Trausch <fd0man at>
To: Yingjie Lan <lanyjie at>
Cc: Chris Angelico <rosuav at>; "python-list at" <python-list at>
Sent: Thursday, August 11, 2011 12:51 PM
Subject: Re: allow line break at operators

> Perhaps it could be made an optional thing to enable; for example, some languages by default do dynamic typing, but with an option contained as the first statement of the file can enforce static typing.

That is a brilliant idea! Python code can specify encoding in the beginning, we might use another similar line to opt in for that kind of language features.

Once in that ';'-required mode, the trouble of typing a ';' at end of almost every line can be easily avoided by a smart editor: 

1) when a single 'Return' key is hit, and the line is not ending in ':' or ';' (white spaces and comments discarded), automatically append a ';' to the end of the line.
2) to continue the line to the next line, hit "Shift+Enter", then no ';' will be appended to the line.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list