Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'plenty': 0.03; 'instance,': 0.05; 'interpreter': 0.05; 'subject:Python': 0.05; 'agree,': 0.07; 'python': 0.08; '>>>>': 0.09; 'follows.': 0.09; 'readable': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'url:peps': 0.09; 'code?': 0.16; 'finney': 0.16; 'res': 0.16; 'span': 0.16; 'url:pep-0008': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'is?': 0.21; 'header:In-Reply-To:1': 0.22; 'indentation': 0.23; 'moreover,': 0.23; 'pep': 0.23; 'tree.': 0.23; 'url:dev': 0.23; 'worst': 0.23; 'writes:': 0.25; 'stuff': 0.26; 'code': 0.26; 'anyway.': 0.29; 'lines': 0.30; 'header:User-Agent:1': 0.33; 'updated': 0.33; 'header:X-Complaints-To:1': 0.34; 'from:addr:yahoo.co.uk': 0.34; 'to:addr:python-list': 0.35; 'url:python': 0.35; 'received:org': 0.36; 'seeing': 0.38; 'think': 0.38; 'url:org': 0.39; 'goes': 0.39; 'received:78': 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'march': 0.61; 'glad': 0.68; 'yourself': 0.69; 'distinguish': 0.84; 'received:as13285.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Python is readable Date: Thu, 15 Mar 2012 23:58:08 +0000 References: <4f612b19$0$1379$4fafbaef@reader2.news.tin.it> <8e72d74f-c844-4de3-8a37-f6b1fdc2291f@y27g2000yqy.googlegroups.com> <50e9ceec-40f1-4ead-b2b6-87328b30d084@ow8g2000pbc.googlegroups.com> <4f61c828$0$1390$4fafbaef@reader2.news.tin.it> <4f61d728$0$1375$4fafbaef@reader2.news.tin.it> <4f61fa8a$0$1381$4fafbaef@reader2.news.tin.it> <4f6202cb$0$1377$4fafbaef@reader2.news.tin.it> <4f6245c5$0$1384$4fafbaef@reader2.news.tin.it> <873999pk52.fsf@benfinney.id.au> <4f627f5c$0$1389$4fafbaef@reader2.news.tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-30-52.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: <4f627f5c$0$1389$4fafbaef@reader2.news.tin.it> X-Antivirus: avast! (VPS 120315-1, 15/03/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 53 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331855919 news.xs4all.nl 6898 [2001:888:2000:d::a6]:43391 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21725 On 15/03/2012 23:46, Kiuhnm wrote: > On 3/16/2012 0:00, Arnaud Delobelle wrote: >> On 15 March 2012 22:35, Ben Finney wrote: >>> Kiuhnm writes: >>> >>>> Moreover, I think that >>>> if (............ >>>> ............ >>>> ............): >>>> ............ >>>> ............ >>>> ............ >>>> is not very readable anyway. >>> >>> I agree, and am glad PEP 8 has been updated to recommend an extra level >>> of indentation for continuation, to distinguish from the new block that >>> follows. >> >> Personally I solve this by never writing if conditions that span more >> than one line. If the worst comes to the worst, I would write: >> >> aptly_named_condition = ( >> very long condition >> that goes over >> plenty of lines >> ) >> if aptly_named_condition: >> do stuff > > Will I be able to use extra indentation in Python code? > For instance, > > res = and(or(cond1, > cond2), > cond3, > or(and(cond4, > cond5, > cond6), > and(cond7, > cond8))) > > I like it because it reads like a tree. > > Kiuhnm Why not find out for yourself by slapping the code into an interactive Python interpreter and seeing what the result is? -- Cheers. Mark Lawrence.