Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'languages,': 0.03; 'python': 0.08; 'derived': 0.09; 'foo': 0.09; 'am,': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'newlines': 0.16; 'whitespace.': 0.16; 'wrote:': 0.16; 'header:In- Reply-To:1': 0.22; 'differ': 0.23; 'indentation': 0.23; 'aug': 0.24; 'originally': 0.24; 'handles': 0.25; "wasn't": 0.28; 'message-id:@mail.gmail.com': 0.29; 'differently': 0.30; 'rarely': 0.30; 'whitespace': 0.30; 'source': 0.33; 'to:addr:python-list': 0.33; 'received:209.85.161': 0.35; 'fri,': 0.36; 'skip:" 10': 0.36; 'languages': 0.37; 'but': 0.37; 'steven': 0.38; 'too,': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; "it's": 0.40; 'course.': 0.63; 'subject:line': 0.73; 'different.': 0.84; 'same:': 0.84; 'significant.': 0.84 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=fzMMpBhIXDFWk5TyUNplwLD6Tmhl+l70KREKS0Nok+M=; b=FTHZBXsn/NyK4RCwuR+UtChMPeyBQJHvozs/EW695uUGu8YQJ9pdUNVlrF4BNvatBC ehaWRsKtqLfxvOTW9NkOQX2bg018TGqYRqJ59xbmkJQV1Bx9GRZPqA1h0/T5ndUPcuXU ArfHLki4ukNyXHASzdhm7vNkB8so2AXq54PG8= MIME-Version: 1.0 In-Reply-To: <4e448471$0$29980$c3e8da3$5496439d@news.astraweb.com> 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> <87obzwh4o0.fsf@benfinney.id.au> <4e448471$0$29980$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 12 Aug 2011 08:09:03 +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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313132946 news.xs4all.nl 23925 [2001:888:2000:d::a6]:50113 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11254 On Fri, Aug 12, 2011 at 2:40 AM, Steven D'Aprano wrote: > Please be careful about conflating significant indentation with significa= nt > whitespace. Many languages have significant whitespace: > > foo bar > > is rarely the same thing as > > foobar > > but is the same as > > foo =A0 =A0 =A0 =A0 =A0 bar > > Python is no different. > Of course. But most languages derived from C have a single lexer token "whitespace". That one token is significant, but these are all the same: foo bar foo bar foo bar foo/* this one wasn't originally the same*/bar Python handles differently source files that differ only in whitespace. It's not only indentation; newlines are whitespace too, and they're significant. In C-derived languages, it's only presence-or-absence. ChrisA