Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!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.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'python': 0.08; 'trailing': 0.09; 'disallow': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:209.85.213.174': 0.16; 'received:mail- yx0-f174.google.com': 0.16; 'syntactic': 0.16; '\xa0for': 0.16; 'wrote:': 0.16; 'detect': 0.21; "doesn't": 0.22; 'stuff': 0.22; 'header:In-Reply-To:1': 0.22; 'indentation': 0.23; 'pm,': 0.24; 'aug': 0.24; 'extent': 0.24; 'code,': 0.28; "wasn't": 0.28; 'problem': 0.28; 'matches': 0.29; 'message-id:@mail.gmail.com': 0.29; 'match': 0.30; 'whitespace': 0.30; 'point,': 0.32; 'this.': 0.32; 'to:addr:python-list': 0.33; "i've": 0.34; 'clearly': 0.34; 'body,': 0.34; 'like:': 0.34; 'fri,': 0.36; 'another': 0.37; 'put': 0.37; 'several': 0.37; 'but': 0.37; 'allows': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; "there's": 0.39; 'empty': 0.39; 'to:addr:python.org': 0.39; 'case': 0.39; 'where': 0.40; 'your': 0.61; 'took': 0.63; 'direct': 0.66; 'utilities': 0.67; 'concept': 0.72; 'subject:line': 0.73 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=fShP4+77cSvUqC//W4mosPJzUeoVZmfAHZA5pVaAmC4=; b=uhVFdkK4552NhS3MAq3/xVYfQX+GQYXKuts+ttl+Uaz4Qz4jrk/C2v4oi9QomuYWNt XIXRMcKOkw6UhfXLT0YMK/VUpUvQTB6mhErqKDm6fNsX5nOVSCr2RCIEdPYamBU5vlkm wGwTbtmjYCIkZPib/ZdptYOucmPGBPJqSRFYg= MIME-Version: 1.0 In-Reply-To: References: <1312951356.77394.YahooMailNeo@web121518.mail.ne1.yahoo.com> <4e424208$0$29965$c3e8da3$5496439d@news.astraweb.com> <1312981104.89312.YahooMailNeo@web121520.mail.ne1.yahoo.com> <1312982377.95657.YahooMailNeo@web121508.mail.ne1.yahoo.com> <87fwl9hr4r.fsf@benfinney.id.au> <4e43cb2a$0$29986$c3e8da3$5496439d@news.astraweb.com> <87d3gahq1b.fsf@benfinney.id.au> Date: Fri, 12 Aug 2011 21:01:56 +0100 Subject: Re: allow line break at operators From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313179319 news.xs4all.nl 23944 [2001:888:2000:d::a6]:40509 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11302 On Fri, Aug 12, 2011 at 5:33 PM, Seebs wrote: > I've seen people in C do stuff like: > > =A0 =A0 =A0 =A0for (i =3D 0; i < N; ++i); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0a[i] =3D 0; > > This is clearly a case where indentation matches intent, but doesn't matc= h > functionality, because C allows indentation to not-match functionality; t= his > is the famous problem Python is solving. > There's several solutions to this. One is linting utilities that detect unexpectedly-indented code, which is the concept that Python took to the logical extent of syntactic errors. Another is (again linting) to disallow a direct trailing semicolon; if you want an empty body, you put whitespace before the semicolon. But that wasn't your point, I realise :) ChrisA