Maintaining Maximum Line Length When Using Tabs Instead of Spaces?

Chris Angelico rosuav at gmail.com
Sun Dec 7 23:46:00 EST 2014


On Mon, Dec 8, 2014 at 3:39 PM, Aahan Krish <krish at aahan.me> wrote:
> As for why I care the "79 chars" part of PEP 8:
>
> - Coding in terminals and VIM with multiple windows open.

Then measure your width with tabs set to 8 spaces, and nothing else
matters. Otherwise, go back to your previous statement about avoiding
arbitrary rules, maximize your terminal window (let's see, if I hit
Alt-F10 on my Xfce system, I get a terminal window that's 51 rows, 190
columns; F11 increases that to 55 rows), and ignore the precise
counts. All your other points are just as valid with 82 characters as
with 79, and pretty much as valid with anything up to about 100-120.

> - Avoiding horizontal scrollbars for code blocks on the web; GitHub
> for instance. E.g.
> https://github.com/torvalds/linux/blob/master/kernel/async.c -- That
> is good!

It goes to 100 frequently, and I found one line that went to 126... if
that's your idea of "good", then I think going as far as 100 in your
own code shouldn't be a problem.

ChrisA



More information about the Python-list mailing list