allow line break at operators

Chris Angelico rosuav at gmail.com
Wed Aug 10 16:45:43 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.

ChrisA



More information about the Python-list mailing list