Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Ian Kelly Newsgroups: comp.lang.python Subject: Re: Continuing indentation Date: Fri, 4 Mar 2016 08:25:49 -0700 Lines: 44 Message-ID: References: <8760x4bo5h.fsf@elektro.pacujo.net> <871t7sbkex.fsf@elektro.pacujo.net> <87vb53se36.fsf@elektro.pacujo.net> <56d8d33d$0$1585$c3e8da3$5496439d@news.astraweb.com> <56D8DF99.6070808@lucidity.plus.com> <56d905a7$0$1605$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 3+P3LgaDM7XdAw+dvKSmDgIjqMF045K3EHpiNobqYKpg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'operator': 0.03; 'received:209.85.223': 0.03; 'binary': 0.05; 'logic': 0.09; 'operator,': 0.09; 'splitting': 0.09; ':-)': 0.12; '2016': 0.16; 'agree.': 0.16; 'pep8': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'why,': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'preferred': 0.20; 'arguments': 0.22; 'am,': 0.23; 'code,': 0.23; 'seems': 0.23; 'split': 0.23; 'header:In-Reply-To:1': 0.24; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'found.': 0.27; 'tend': 0.27; 'correct': 0.28; 'function': 0.28; 'pep': 0.29; 'unlikely': 0.29; "i'm": 0.30; "d'aprano": 0.33; 'steven': 0.33; "i'll": 0.33; 'received:google.com': 0.35; 'next': 0.35; 'could': 0.35; 'something': 0.35; 'there': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'wrong': 0.38; 'end': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'more': 0.63; 'mar': 0.65; 'believe': 0.66; 'aaa': 0.84; 'to:name:python': 0.84; 'yyy': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=x6pJnhLarZK2tWm/MOevnP9t4wTwBD/uSCOdQhD0Eqs=; b=yarFgrMo8AUrheg5x+ENrbXBAkr+Xzo/digR5ouLQGqyjF+aBvbee+mN6le85RnzEg POdy9vYvREvcQOrC5oiovneQ8nGkcZhI8eXILOp7JgMIdBgJf6rdEv5opVummwiAss3r 6/Uw+7ZLTYcyCesk9gQB82vfOQqkwgZLoOs1TRFI1aaAheYPeeNKv/3s7EMW5WzAZAMd ZVK7j23pBmwsj0GTDXfSOlUvQs9/OAg2LKDZGFz1VtI0Rt6bIjYG6K9ZJEtCyHJQLthm 81+4yxZM7AcPuBxyqyWaRuYR39/ABydOT4cfAYhl53XWEfK448ikwimT2qvyNPx1dRxa VHFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=x6pJnhLarZK2tWm/MOevnP9t4wTwBD/uSCOdQhD0Eqs=; b=IlpGPmxk227/x1OmuRoPkXQgzy8B/axqCjF1yGVXQjmNrhm488F5h8viDpKAJMu766 AXuI929puQ28VYIgd7SvI1vITYPiHykMyRtUsLlAr4dg5WUeeWabWojQ9sHgiRSI0asp FDrhVR6FRv1mQZzXRO90AGe2mkZYWsYL2xPSLTH6+lSAcaBojiBkRwWa29xOdhm5FsUI N508fODF9Vio8YNQeSSUp7LPVQ1NjJgzEU1PRgfoasJBa84C1p/U0T4kp2AfAN4myOt2 OLjnhw3sH4sN9qJig14qwM7QL6POrcCvQSPV5QOFM0i1z2DLosCLFBxreyV56WDHVM7X +3tg== X-Gm-Message-State: AD7BkJLGpkgB7i9yKnYvztRo972FvXL25w4PSRW6kcFDa0RqVKrVvzId6aC2I5DeXrGY7OVKxrKVyha2qCt+qw== X-Received: by 10.107.19.140 with SMTP id 12mr5837378iot.11.1457105189077; Fri, 04 Mar 2016 07:26:29 -0800 (PST) In-Reply-To: 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: , Xref: csiph.com comp.lang.python:104041 On Fri, Mar 4, 2016 at 7:03 AM, alister wrote: > On Fri, 04 Mar 2016 10:12:58 +0000, cl wrote: > >> Steven D'Aprano wrote: >>> On Fri, 4 Mar 2016 12:23 pm, INADA Naoki wrote: >>> >>> >>> >> >>> >> Indeed. I don't understand why, when splitting a condition such as >>> >> this, >>> >> people tend to put the operator at the end of each line. >>> >> >>> >> >>> > Because PEP8 says: >>> > >>> >> The preferred place to break around a binary operator is after the >>> > operator, not before it. http://pep8.org/#maximum-line-length >>> >>> PEP 8 is wrong :-) >>> >> Yes, I agree. In my mind the logic is:- >> >> IF xxx >> AND yyy AND zzz OR aaa >> THEN do something >> >> The PEP8 correct(er):- >> >> IF xxx AND >> yyy AND zzz OR aaa >> THEN do something >> >> ... just seems all wrong and difficult to understand. > > not at all > the split after the operator shows that their is more to that line > splitting before & the reader could believe that the condition ends there > > PEP 8 is mos definitely correct on this one I disagree. When I'm skimming over code, I find it unlikely that I'll read the last token of the line. That's where trivialities like arguments to function calls are found. It's much more likely that I'll read the first token of the next line.