Comment 3 for bug 629916

Revision history for this message
Skip Montanaro (smontanaro) wrote : Re: indentation with backslash line continuations

Am 25.03.2011 19:32, schrieb <email address hidden>:
> I find this indentation truly grating:
>
> self.last_abc_attr = self.last_xyz_attr = \
> self.last_abc_other = \
> self.last_xyz_other = None
>
> Now, I can move self.last_xyz_attr to a continuation line, but though the
> result is slightly different, it is, in my opinion, just as bad:
>
> self.last_abc_attr = \
> self.last_xyz_attr = \
> self.last_abc_other = \
> self.last_xyz_other = None
>
> What I would like to see is this (given a four-space block indent):
>
> self.last_abc_attr = \
> self.last_xyz_attr = \
> self.last_abc_other = \
> self.last_xyz_other = None
>
> or, if the second expression remained on the first line:
>
> self.last_abc_attr = self.last_xyz_attr = \
> self.last_abc_other = \
> self.last_xyz_other = None
>
> I don't care if this behavior is the default. I just want to be able to
> control it. Currently, I have to manually format lines like this, and if
> I'm not careful and reindent an entire function or file, then python-mode
> undoes my work.