[Python-ideas] PEP 8 update on line length
Christopher Barker
pythonchb at gmail.com
Thu Feb 21 03:04:25 EST 2019
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190221/2d1bfdaa/attachment.html>
More information about the Python-ideas
mailing list