[Python-ideas] PEP 8 update on line length

Stéfane Fermigier sf at fermigier.com
Tue Feb 19 06:23:06 EST 2019


My two cents, because this is a subject about which I have a strong opinion:

- Yes, VT100s and other green screen terminals have long since been out of
fashion, but there are still some people, including myself, who like their
xterms and iTerms in the standard size (80x24). Also, we sometime need to
browser code from a smartphone, in which case physical (not just virtual)
screen size is really an issue.

- Yes, for maximum code readability, it's better to optimise for ~70 no
whitespace characters max, which is approximately 80 characters overall if
you you put space properly around / after commas, plusses, equals, etc.

- OTOH: there is now a wonderful tool called Black (
https://github.com/ambv/black ) which is so good at turning badly formatted
code into readable code that I've stopped worrying about this kind of
issues (even though, as stated initially, I have a strong attachment to
it). Black's default is 88, not 80, which conflicts a bit with the two
previous points, but Black is, IMHO, so good that I've stopped thinking
about it (there is a way to override the default setting, which I should be
using, but I don't).

Cheers,

  S.

-- 
Stefane Fermigier - http://fermigier.com/ - http://twitter.com/sfermigier -
http://linkedin.com/in/sfermigier
Founder & CEO, Abilian - Enterprise Social Software -
http://www.abilian.com/
Chairman, Free&OSS Group @ Systematic Cluster -
https://systematic-paris-region.org/fr/groupe-thematique-logiciel-libre/
Co-Chairman, National Council for Free & Open Source Software (CNLL) -
http://cnll.fr/
Founder & Organiser, PyParis & PyData Paris - http://pyparis.org/ &
http://pydata.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190219/70e33fe5/attachment.html>


More information about the Python-ideas mailing list