PEP8 has recently updated to allow for other preferences: > Some teams strongly prefer a longer line length. For code maintained > exclusively or primarily by a team that can reach agreement on this issue, > it is okay to increase the nominal line length from 80 to 100 characters > (effectively increasing the maximum length to 99 characters), provided that > comments and docstrings are still wrapped at 72 characters.
With the advent of larger, high-resolution screens, the 80-char limit doesn't make as much sense any more. I'm in favour of keeping lines shorter, but I believe 100 characters is sufficient. On Wednesday, 1 January 2014 14:54:31 UTC-6, Spencer Russell wrote: > > On Wed, Jan 1, 2014 at 12:33 PM, Dahua Lin <lind...@gmail.com<javascript:> > > wrote: >> >> I agree that overly long lines hurt readability. However, I think a hard >> threshold of 80 chars is too restrictive. Just take a quick skim of the >> Julia code base, you will find plenty of lines well beyond this limit (even >> lines over 120 chars are not uncommon). >> >> This is kind of related to some of the Julia's language features (e.g. >> parameter annotation, and one-line definition of functions, etc). In such >> cases, code lines that are a little bit longer wouldn't make a big problem. >> I found it sometimes even more annoying to break lines simply for the sake >> of the fitting some limit on line length. >> > > I think that this points to some additional guidelines about how to > cleanly break expressions up across line breaks. I tend to follow python > guidelines on this, though I'm python-biased: > > http://www.python.org/dev/peps/pep-0008/#indentation > > I think it's good to have a number (80 chars) for what's considered a long > line. I typically am working in a terminal window with several files open > side-by-side, and having a consistent width makes it easier to navigate and > see what's going on. It also makes the code easier to read in diffs, on > github, etc. > > -s >