Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '(at': 0.04; 'expressions': 0.07; 'e.g.,': 0.09; 'lines:': 0.09; 'pep': 0.09; 'references,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'windows': 0.15; 'cc:name:python list': 0.16; 'defence': 0.16; 'exception:': 0.16; 'monitors': 0.16; 'newline,': 0.16; 'personally,': 0.16; 'too).': 0.16; 'url:pep-0008': 0.16; 'url:peps': 0.16; 'you..': 0.16; 'wrote:': 0.18; 'library': 0.18; 'wed,': 0.18; 'example': 0.22; 'cc:addr:python.org': 0.22; 'char': 0.24; 'library,': 0.24; 'stick': 0.24; 'url:dev': 0.24; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'point': 0.28; 'external': 0.29; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'lines': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'front': 0.32; 'regular': 0.32; 'url:python': 0.33; 'projects.': 0.33; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'jason': 0.38; 'pm,': 0.38; 'little': 0.38; 'skip:8 10': 0.39; 'users': 0.40; 'even': 0.60; 'up,': 0.60; 'break': 0.61; 'first': 0.61; 'you.': 0.62; 'wall': 0.65; 'here': 0.66; 'limit': 0.70; 'embrace': 0.84; 'liking': 0.84; 'skip:/ 30': 0.84; 'url:03': 0.84; 'url:2013': 0.84; 'to:none': 0.92; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:cc:content-type; bh=FppzDCmO/ZOgDvVTRtI3eprrG3y6pD/2vHq4O5fgcdM=; b=viDsweAiRVTQvc2hr0DE/MPy8HY71idFIfnMIu/skl5CArgA9CAOKMAit3lorfR3vy GmUwQ6pTeMJc4O7FfMceyR05u36Lt8SsmJgbAKhdu52OMJMtALODwwAmYTB7jTodqsxc 1YzwUVjr2GF00Al2/iydnHqPHs8RzESkLQYVTV406Lt3HvtsG5PUMtqpHD3Dzu/PPUQI 7Q3RzdcjrCBl9wzWp4fxRIMFWU3qsKfYZjQT4F0rcG6o/Mz9dU3Sou0qm2m8qMehqgX1 bKDIWF6Pk/khcAz1Uu5pYb3uParQgOafwEAaRg5svKZ6W+P5HzXRCnTEct0EqU6/Uxek QMjg== MIME-Version: 1.0 X-Received: by 10.42.70.74 with SMTP id e10mr3213656icj.38.1365077610175; Thu, 04 Apr 2013 05:13:30 -0700 (PDT) In-Reply-To: <515cd919$0$29966$c3e8da3$5496439d@news.astraweb.com> References: <515cd919$0$29966$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 4 Apr 2013 08:13:30 -0400 Subject: Re: In defence of 80-char lines From: Jason Swails Cc: python list Content-Type: multipart/alternative; boundary=90e6ba2121bb0ba43204d987e6b4 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 91 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365077619 news.xs4all.nl 6961 [2001:888:2000:d::a6]:46816 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42749 --90e6ba2121bb0ba43204d987e6b4 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Apr 3, 2013 at 9:36 PM, Steven D'Aprano < steve+comp.lang.python@pearwood.info> wrote: > Although PEP 8 is only compulsory for the Python standard library, many > users like to stick to PEP 8 for external projects. > But even the standard library breaks this rule on occasion. e.g., /usr/lib/python2.7/urllib.py:1095 (I remember seeing others, but this is the first example I was able to find quickly). > > http://www.python.org/dev/peps/pep-0008/ > > With perhaps one glaring exception: many people hate, or ignore, PEP 8's > recommendation to limit lines to 80 characters. (Strictly speaking, 79 > characters.) > > > Here is a good defence of 80 char lines: > > http://wrongsideofmemphis.com/2013/03/25/80-chars-per-line-is-great/ Personally, I try my best to keep all lines at 80 character max (80 + newline, not 79). In addition to liking my 84-character-width gvim windows (to allow a little leeway) side-by-side for code references, I'm definitely not above printing out some code to lay it out on a desk---that's not something you can do on-screen without a wall of monitors in front of you. The only time I regularly break my rule is for regular expressions (at some point I may embrace re.X to allow me to break those up, too). All the best, Jason --90e6ba2121bb0ba43204d987e6b4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

<= /div>

On Wed, Apr = 3, 2013 at 9:36 PM, Steven D'Aprano <steve+comp.lan= g.python@pearwood.info> wrote:
Although PEP 8 is only compulsory for the Py= thon standard library, many
users like to stick to PEP 8 for external projects.
But even th= e standard library breaks this rule on occasion. =A0e.g., /usr/lib/python2.= 7/urllib.py:1095 (I remember seeing others, but this is the first example I= was able to find quickly).


http= ://www.python.org/dev/peps/pep-0008/

With perhaps one glaring exception: many people hate, or ignore, PEP 8'= s
recommendation to limit lines to 80 characters. (Strictly speaking, 79
characters.)


Here is a good defence of 80 char lines:

http://wrongsideofmemphis.com/2013/03/25/80-chars-p= er-line-is-great/

Personally, I try my best to keep all lines at 80 character max (80 + newli= ne, not 79). =A0In addition to liking my 84-character-width gvim windows (t= o allow a little leeway) side-by-side for code references, I'm definite= ly not above printing out some code to lay it out on a desk---that's no= t something you can do on-screen without a wall of monitors in front of you= .

The only time I regularly br= eak my rule is for regular expressions (at some point I may embrace re.X to= allow me to break those up, too).

All the best,
Jason
=
--90e6ba2121bb0ba43204d987e6b4--