Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Date: Sun, 17 Apr 2016 06:21:54 +1000 Lines: 56 Message-ID: References: <5711c1b3$0$1596$c3e8da3$5496439d@news.astraweb.com> <87shym6kpo.fsf@elektro.pacujo.net> <87h9f26ioa.fsf@elektro.pacujo.net> <85potpuwwt.fsf_-_@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de sG9cyBlgrhaHQZ2ErZ0e1w3J/J+Qi+Zjc9rdl2OrifVg== Cancel-Lock: sha1:xkCfqlv3A2yuin6UQmYquwPE6ls= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'false.': 0.07; 'obsolete': 0.07; 'subject:PEP': 0.07; 'disregard': 0.09; 'oh,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tab': 0.09; 'python': 0.10; 'read.': 0.13; 'subsequent': 0.15; '(do': 0.16; 'advice,': 0.16; 'arbitrarily': 0.16; 'compliant,': 0.16; 'displays.': 0.16; 'fatal': 0.16; 'mean,': 0.16; 'pep8': 0.16; 'readability.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'rule.': 0.16; 'suggestion.': 0.16; 'library': 0.20; 'names.': 0.22; 'space.': 0.22; 'code.': 0.23; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'chris': 0.26; 'least': 0.27; '120': 0.29; 'pep': 0.29; 'sure,': 0.29; 'windows,': 0.29; 'code': 0.30; 'programmers': 0.30; 'post': 0.31; 'maybe': 0.33; 'source': 0.33; 'surely': 0.33; 'on,': 0.35; 'ones': 0.35; 'could': 0.35; 'feed': 0.35; 'but': 0.36; 'should': 0.36; 'lines': 0.36; 'tool': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'several': 0.38; 'subject:the': 0.39; 'enough': 0.39; 'along': 0.39; 'easily': 0.39; 'to:addr:python.org': 0.40; 'space': 0.40; 'easy': 0.60; 'your': 0.60; 'back': 0.62; 'skip:n 10': 0.62; 'great': 0.63; 'limit': 0.65; 'believe': 0.66; 'compliant': 0.66; 'remember,': 0.66; 'article': 0.77; 'age': 0.84; '_o__)': 0.84; 'compliant.': 0.84; 'muller': 0.84; 'received:125': 0.84; 'subject:People': 0.84; 'apparent': 0.91; 'belief': 0.91; '\xe2\x80\x9cthe': 0.93; 'hundred': 0.96 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <85potpuwwt.fsf_-_@benfinney.id.au> X-Mailman-Original-References: <5711c1b3$0$1596$c3e8da3$5496439d@news.astraweb.com> <87shym6kpo.fsf@elektro.pacujo.net> <87h9f26ioa.fsf@elektro.pacujo.net> Xref: csiph.com comp.lang.python:107111 Chris Angelico writes: > Maybe we need a blog post "Falsehoods Programmers Believe About PEP > 8", along the lines of the ones about time and names. Great suggestion. (Do you have a blog on which you could post an article like this?) > Remember, every one of these is false. > > * All Python code should follow PEP 8. > > * If you use a tool named pep8, your code will be PEP 8 compliant. > > * If your code is PEP 8 compliant, a tool named pep8 will accept it. > > * The Python Standard Library is PEP 8 compliant. > > * Okay, at least the new parts of the standard library are PEP 8 > compliant. > > * PEP 8 compliant code is inherently better than non-compliant code. > > * PEP8-ing existing code will improve it. > > * Once code is PEP 8 compliant, it can easily be kept that way through > subsequent edits. > > * PEP 8 never changes. > > * Well, it never materially changes. > > * I mean, new advice, sure, but it'll never actually go back on a > rule. * The line length limit is obsolete in an age of high-resolution displays. * Okay, but if you disregard side-by-side windows, lines of code can be arbitrarily long without hurting readability. * Well, maybe not several hundred characters, but surely 120 characters of code on a line is easy enough to read. * The only valid white space is line breaks and U+0020 SPACE. * Okay, U+0009 TAB when lining up columns, but no other white space. * Oh, come on, no-one would use U+000C FORM FEED in source code. -- \ “The apparent lesson of the Inquisition is that insistence on | `\ uniformity of belief is fatal to intellectual, moral, and | _o__) spiritual health.” —_The Uses Of The Past_, Herbert J. Muller | Ben Finney