[Python-ideas] PEP 8 update on line length
Alex Walters
tritium-list at sdamon.com
Sun Feb 24 23:45:49 EST 2019
> Probably because IBM decided on 80 columns for their punched cards.
> And that probably didn't have anything to do with a readable width
> for text. Nobody used computers for word processing back then.
> In fact punched cards predate computers altogether, originally
> being developed for electromechanical accounting and record keeping
> machines.
>
Textile looms, actually. Neither here nor there about the length of lines
in PEP8 but an interesting factoid none the less. IBM (and possibly others)
took punch cards from looms.
On the subject of the 79 character line limit, its come up a lot in the
past.
* PEP-8 is the guidelines for the standard library that python-dev doesn't
even strictly enforce. While it makes a decent starting point for your own
project guidelines, change anything you want.
* 79 characters is a reasonable ball-park figure for how long a line should
be for most people
* Going much above 79 characters is an indication of code smell
* No matter what number you come up with, someone is going to be upset.
There is no way to win in changing the guideline. PEP-8 is not a universal
truth, or even a standard, we really shouldn't be treating it like it is.
More information about the Python-ideas
mailing list