Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: Python is readable 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> 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 Date: Fri, 16 Mar 2012 10:57:33 +1100 Message-ID: <87mx7ho1si.fsf@benfinney.id.au> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:cXQnBhhD0nXaPbJVX5BNlCmo0eM= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 22 Organization: Unlimited download news at news.astraweb.com NNTP-Posting-Host: a70e24da.news.astraweb.com X-Trace: DXC=lk88VD]_e7_;0`5D\QI41SL?0kYOcDh@Z7^o:UA4R?cU=H4TLma<=P[]G;2>V^?kWSbEW9A[5UK?UNZ[SL`C\KgS`MIDUKYh\EQ Xref: csiph.com comp.lang.python:21724 Arnaud Delobelle writes: > On 15 March 2012 22:35, Ben Finney wrote: > > 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. The admonition applies not only to ‘if’ conditions, but also to ‘while’, ‘with’, ‘for’, etc.; and also to bracketing constructs like function calls, literal lists/dicts/sets, etc. In a single statement, the indentation for continuation lines should be indented two levels, so that they don't look so much like a new block of statements. -- \ “If you do not trust the source do not use this program.” | `\ —Microsoft Vista security dialogue | _o__) | Ben Finney