Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:not': 0.03; 'syntax': 0.04; 'odd': 0.07; 'subject:Error': 0.07; 'suddenly': 0.07; 'tries': 0.07; 'string': 0.09; 'lines.': 0.09; 'literal': 0.09; 'python': 0.11; 'eclipse': 0.16; 'expression.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'indent': 0.16; 'roy': 0.16; 'unexpected': 0.16; 'way;': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'split': 0.19; 'starts': 0.20; 'aug': 0.22; 'error': 0.23; "i've": 0.25; 'handling': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'agreed.': 0.31; 'helpful.': 0.31; 'piece': 0.31; 'there.': 0.32; 'text': 0.33; 'bugs': 0.33; 'maybe': 0.34; 'subject:the': 0.34; "can't": 0.35; 'tool': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'next': 0.36; 'subject:?': 0.36; 'auto': 0.38; 'to:addr:python-list': 0.38; 'previous': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; "you're": 0.61; 'become': 0.64; 'more': 0.64; 'here': 0.66; 'smith': 0.68; 'obvious': 0.74; 'article': 0.77; '95%': 0.84; 'understand,': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=70KAdGWOjx4sBlt3GLevJiRTiErbViZGsIP8XQh3iDk=; b=DTErnXpetGSzlUG4VOGT3Kat+WaOahrIFRJSykJwmSjZcRGicOLagZIemPjk93JRZe 3tNQH6fgBVfcwdfm4wW4RZw/krGm1k+2XFoM/Du/BBwBVVg66Ou2mB3rlLqgfaOkuogR Oh4zZ52Y3io8AUP2CknukRiFy2JZx0d+L9QPSxWy+H0yNjV9+3NgSbKeiXhNjR8sBcMj 8O4RmK+NZTVpbURPfVlcNWd332e9oi872U0ZShpvAa2vDzfrUy/fdpCKNGuL8Qew2E7+ ypskGOFHLwa0b6HRdGPIx1U+sNK29XGs0MZGuPPNj7HsA2uj4wL75EomD150jWcqc5dl kEvg== MIME-Version: 1.0 X-Received: by 10.58.134.84 with SMTP id pi20mr7420075veb.55.1376189272996; Sat, 10 Aug 2013 19:47:52 -0700 (PDT) In-Reply-To: References: <5206F4AB.8050204@Gmail.com> Date: Sun, 11 Aug 2013 03:47:52 +0100 Subject: Re: Am I not seeing the Error? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376189281 news.xs4all.nl 15869 [2001:888:2000:d::a6]:59863 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52346 On Sun, Aug 11, 2013 at 3:43 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> When you get a syntax error you can't understand, look at the previous >> line of code. Perhaps something there is incomplete; maybe you have >> mismatched parentheses, so this line is considered to be part of the >> same expression. >> >> Next thing to do is split it into more lines. Why is all that in a single >> line? > > Also, try reformatting the code in a tool like emacs or eclipse which > does syntax coloring and auto indenting. Often, if you're missing some > piece of punctuation, it will become obvious when your tool tries to > indent things in some unexpected way. Or suddenly starts coloring all > of your program text as if it were a string literal :-) Agreed. Though I've had some odd issues with SciTE in that way; I think its Python handling may have bugs in it here and there. But 95% of the time it's helpful. ChrisA