[Python-ideas] allow line break at operators

Roy Smith roy at panix.com
Sat Sep 3 12:59:59 EDT 2011


In article <mailman.688.1314941609.27778.python-list at python.org>,
 Matt Joiner <anacrolix at gmail.com> wrote:

> I guess the issue here is that you can't tell if an expression is
> complete without checking the indent of the following line. This is
> likely not desirable.

I wrote a weird bug the other day.  I had a function that returned a 
4-tuple and wanted to unpack it, so I wrote:

    var1,
    var2,
    var3,
    var4 = my_function()

which isn't a syntax error, but also isn't what I meant.  Depending on 
whether var[123] have pre-existing values, this doesn't even produce a 
run-time error.  Emacs encouraged me in this crime by merrily 
auto-indenting the code the way I expected :-)



More information about the Python-list mailing list