Steven D'Aprano <[email protected]> wrote:
> On Fri, 4 Mar 2016 12:23 pm, INADA Naoki wrote:
>
> >>
> >>
> >> Indeed. I don't understand why, when splitting a condition such as this,
> >> people tend to put the operator at the end of each line.
> >>
> >>
> > Because PEP8 says:
> >
> >> The preferred place to break around a binary operator is after the
> > operator, not before it.
> > http://pep8.org/#maximum-line-length
>
> PEP 8 is wrong :-)
>
Yes, I agree. In my mind the logic is:-
IF xxx
AND yyy
AND zzz
OR aaa
THEN do something
The PEP8 correct(er):-
IF xxx AND
yyy AND
zzz OR
aaa
THEN do something
... just seems all wrong and difficult to understand.
--
Chris Green
ยท
--
https://mail.python.org/mailman/listinfo/python-list