Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ethan Furman Newsgroups: comp.lang.python Subject: Re: Continuing indentation Date: Wed, 02 Mar 2016 14:01:04 -0800 Lines: 26 Message-ID: References: <8760x4bo5h.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 5wz618K2nIxrf3ou747n3ApdQe17TCYasGlAzoZHQv2w== 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; 'continuation': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'statements': 0.09; 'way:': 0.09; '12:50': 0.16; "isn't.": 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'skip': 0.18; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'header :User-Agent:1': 0.26; '~ethan~': 0.29; "i'm": 0.30; 'code': 0.30; 'strongly': 0.30; 'running': 0.34; 'there': 0.36; 'lines': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'missing': 0.37; 'no,': 0.38; 'to:addr:python.org': 0.40; 'some': 0.40; 'charset:windows-1252': 0.62; 'idiomatic': 0.84 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <8760x4bo5h.fsf@elektro.pacujo.net> 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:103902 On 03/02/2016 12:50 PM, Marko Rauhamaa wrote: > Skip Montanaro queried: > >> Running flake8 over some code which has if statements with multiple >> conditions like this: >> >> if (some_condition and >> some_other_condition and >> some_final_condition): >> play_bingo() >> [...] >> >> is there a better way to break lines I'm missing which will make >> flake8 happy? > > This is the idiomatic way: > > if some_condition and \ > some_other_condition and \ > some_final_condition: > play_bingo() No, it isn't. Using '\' for line continuation is strongly discouraged. -- ~Ethan~