[Python-ideas] 80 character line width vs. something wider

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 22 02:02:20 CEST 2009


Scott Dial wrote:
> Given the large body
> of code that already follows PEP8 (and other style guides for other
> languages that commonly use an 80-character boundary), it is a common
> constraint which yields many common idioms (such as placing list items
> on separate lines with similar indention).

I still don't think it's the same thing. Limiting
lines to 80 chars or thereabouts is not an *arbitrary*
constraint. There are intrinsic merits to it, e.g.
people find very long lines hard to read, you can
fit multiple windows side by side, etc.

On the other hand, there's nothing inherently virtuous
about writing in iambic pentameter or avoiding the
use of the letter "e". The only merit of such
constraints is that they push you *away* from a very
small area of badness (i.e. cliches) and out into
a much bigger area of non-badness (any non-cliched
way of saying the same thing).

I don't think you can do the same thing with
programming. You can't get a good program just by
avoiding bad things, you have to actively aim for
the good things.

-- 
Greg



More information about the Python-ideas mailing list