Continuing indentation
alister
alister.ware at ntlworld.com
Fri Mar 4 09:03:04 EST 2016
On Fri, 04 Mar 2016 10:12:58 +0000, cl wrote:
> Steven D'Aprano <steve at pearwood.info> 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.
not at all
the split after the operator shows that their is more to that line
splitting before & the reader could believe that the condition ends there
PEP 8 is mos definitely correct on this one
--
According to all the latest reports, there was no truth in any of the
earlier reports.
More information about the Python-list
mailing list