Comment 1 for bug 629916

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: indentation with backslash line continuations

Hi,

thanks taking part.

As the indentation cases provided don't concern syntax,
I'm afraid it's a pure style question with several
solutions possible.

Interesting matter, please permit some considerations
(just personal views, which might be wrong...)

If a indent in python has not syntactic meaning, that
  should be visible IMHO, if possible.

Given that's a valid argument, both styles offered are
not satisfying. I'd choose

foo_long_long_long_long = (
                           bar_long_long_long_long[
                           (x_long_long_long_long == X) &
                           (y_long_long_long_long == Y)])

resp.

foo_long_long_long_long = \
                          bar_long_long_long_long[
                          (x_long_long_long_long == X) &
                          (y_long_long_long_long == Y)]

BTW not displayed correctly here.
Indent should be at the column of first lines end.

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/