[Python-ideas] PEP 8 update on line length
Paul Ferrell
pflarr at gmail.com
Thu Feb 21 07:18:32 EST 2019
My linter is fine with a double indent after an 'if (A and'. I thought it
was in the standard.
(Pycharm's built-in pep-8 highlighter)
On Thu, Feb 21, 2019, 1:04 AM Christopher Barker <pythonchb at gmail.com wrote:
> On Wed, Feb 20, 2019 at 11:51 PM Lele Gaifax <lele at metapensiero.it> wrote:
>
>> that most annoys me is the "if" when the condition is very long, because
>> my
>> eyes suffer when I see the following:
>>
>
> yup -- "if (" is four spaces -- exactly one indentation level -- that is
> really painful.
>
> I've got to figure out how to get flake8 to stop yelling at me for making
> that more readable :-)
>
> of difference between the continued condition elements and the succeeding
>> suite:
>>
>> if ((condition1
>> and condition2
>> and condition3)):
>> do_something()
>>
>
> ouch! ehy not jsut do:
>
> if (condition1
> and condition2
> and condition3)):
> do_something()
>
> (or any number of other options)
>
> and teach your linter that that's OK (or ignore your linter)
>
> -CHB
>
>
> --
> Christopher Barker, PhD
>
> Python Language Consulting
> - Teaching
> - Scientific Software Development
> - Desktop GUI and Web Development
> - wxPython, numpy, scipy, Cython
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190221/c8864e7e/attachment.html>
More information about the Python-ideas
mailing list