allow line break at operators

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


________________________________
From: Michael Trausch <fd0man at gmail.com>
To: Yingjie Lan <lanyjie at yahoo.com>
Cc: Chris Angelico <rosuav at gmail.com>; "python-list at python.org" <python-list at python.org>
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.

Cheers,

Yingjie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110811/a61cca82/attachment-0001.html>


More information about the Python-list mailing list