Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.047 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'syntax': 0.04; 'cursor': 0.09; 'backwards': 0.16; 'bracket': 0.16; 'bracket,': 0.16; 'brackets': 0.16; 'brackets.': 0.16; 'curly': 0.16; 'navigating': 0.16; 'simpson': 0.16; 'subject:Problem': 0.16; 'to:name:python list': 0.16; 'followed': 0.16; 'wrote:': 0.18; 'error': 0.23; '(or': 0.24; 'header:In-Reply-To:1': 0.27; 'matching': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'view.': 0.31; 'subject:the': 0.34; 'subject:with': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'editor': 0.35; 'received:google.com': 0.35; 'functions.': 0.36; 'i.e.': 0.36; 'next': 0.36; 'shows': 0.36; 'received:209': 0.37; 'sometimes': 0.38; 'to:addr:python-list': 0.38; 'subject:" ': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'is.': 0.60; 'first': 0.61; 'between': 0.67; 'close': 0.67; 'square': 0.74; 'oscar': 0.84; 'bounce': 0.91; 'technique': 0.93; '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:from:date:message-id:subject:to :content-type; bh=RpzSnH5gwGD6umoBrHFO4jciKtRVIAGqKgcdgIkKIBw=; b=xyrtEcY3eNCBge63cDfyzmNjBaPXlnRpQHR1k7hDJLtO5flTfnTFjgTkI8HL6nGXdq ZnWJGXw8yYlqmY05JHi8Xr+EfvYmX6iQRT6Vg89XeVEDYdmUEx20W41KpanDJLiEjBs/ wBnXV3BuNi4QP7lqcqZGiEyv4VwK+phsCdgg2gOzC/T/XJqVjZcXmjebvyKZD6b9MLL+ ACD8FuLYGSNjvmptT5lLXSsKcfZjHkg72wssd4/CLehxTHw41oANfHrnbK0PKnQx4fGf fvQiAL+N4Kv4a1lXQDj7zuP/qe/3XlO9dbqUVwhZLNCDv+N2R3J/dzBPnrDjtD2Ig8e8 Q2oA== X-Received: by 10.58.118.200 with SMTP id ko8mr3149926veb.94.1371738808452; Thu, 20 Jun 2013 07:33:28 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130620031113.GA85034@cskk.homeip.net> References: <20130620031113.GA85034@cskk.homeip.net> From: Oscar Benjamin Date: Thu, 20 Jun 2013 15:33:08 +0100 Subject: Re: Problem with the "for" loop syntax To: Python List 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371738816 news.xs4all.nl 15921 [2001:888:2000:d::a6]:33577 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48795 On 20 June 2013 04:11, Cameron Simpson wrote: > I use vi/vim and it both shows the matching bracket when the cursor > is on one and also have a keystroke to bounce the curser between > this bracket and the matching one. > > If you suspect you failed to close a bracket, one approach is to > go _below_ the syntax error (or right on it) and type a closing > bracket. Then see where the editor thinks the opening one is. I use this technique sometimes and it works if the unclosed bracket is still in view. If you use vim then you can do [( i.e. type '[' followed by '(' in normal mode. It will jump backwards to the first unmatched opening bracket. Use ]) to find the next unmatched closing bracket. You can also do [{ and ]} for curly brackets. I'm not sure how to do square brackets - [[ and ]] are used for navigating between functions. Oscar