allow line break at operators
lanyjie at yahoo.com
Thu Aug 11 04:58:22 CEST 2011
On Wed, Aug 10, 2011 at 1:58 PM, Yingjie Lan <lanyjie at yahoo.com> wrote:
> Is it possible for python to allow free splitting of single-line statements
> without the backslashes, if we impose that expressions can only be split
> when it is not yet a finished expression?
:The trouble is that in a lot of cases, the next statement after an
:unfinished expression could conceivably be a continuation of it. If
:this were permitted, it would have to also require that the
:continuation lines be indented, to avoid the problem described above.
:It'd still have the potential to mis-diagnose errors, though.
Indentation is a good idea to reduce the likelihood of such troubles.
and also produce code that is easier to read.
More information about the Python-list