Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #48790

Re: Problem with the "for" loop syntax

Path csiph.com!usenet.pasdenom.info!gegeweb.org!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <joshua.landau.ws@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.090
X-Spam-Evidence '*H*': 0.83; '*S*': 0.01; 'syntax': 0.04; 'python': 0.11; '(syntax': 0.16; 'bracket,': 0.16; 'brackets': 0.16; 'simpson': 0.16; 'subject:Problem': 0.16; 'wrote:': 0.18; 'error': 0.23; '(or': 0.24; 'header:In-Reply-To:1': 0.27; 'received:209.85.217': 0.29; 'message-id:@mail.gmail.com': 0.30; 'quite': 0.32; 'to:name:python-list': 0.33; 'actual': 0.34; 'subject:the': 0.34; 'subject:with': 0.35; 'received:209.85': 0.35; 'editor': 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'received:209': 0.37; 'skip:o 20': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'is.': 0.60; 'kind': 0.63; 'close': 0.67; 'line,': 0.68; 'technique.': 0.84; 'mistake': 0.91; '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=rGjQbbo01HW8UHNE25zEN6vbmBb4GKArewjKkkqYRxI=; b=S9BuCJN6eoPQbKMykoiCjAQnogjMFDE+igq7C4ZyO6dIzq9yHI/iWxbU3xIXiSVDKe 33b/0qFagNGLjY18G0bNJbKbPcyZ/Smq8E68i68O+FOp2hfdRhxMc1NP6uM4GkglinXi GIcDf7x2oG1pxZyJV7D28ZU5IHUERyxikjBFo/bN7QmhcTzvnTX/3D7yPLeL0o8taO1o BFynFFcliPzdwBQi9K/MrdUafDXnUHEPfuu02OdQcWyRZl6T9G1eg7UFEYJvTNnJgewY el2q3zntHCCkPtbWTBM+FKBTli8Dx4lcIJhAUvNrKcnTGUW84rgQL1+g8Ha9QWYXel5Q /lcA==
X-Received by 10.152.88.78 with SMTP id be14mr3755254lab.19.1371735591624; Thu, 20 Jun 2013 06:39:51 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <20130620031113.GA85034@cskk.homeip.net>
References <CAPTjJmqJeab8aCihPxbTqhUYkyD089FuftTRLfhMsYTg3J+ZaA@mail.gmail.com> <20130620031113.GA85034@cskk.homeip.net>
From Joshua Landau <joshua.landau.ws@gmail.com>
Date Thu, 20 Jun 2013 14:39:11 +0100
Subject Re: Problem with the "for" loop syntax
To python-list <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3621.1371735593.3114.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371735593 news.xs4all.nl 15994 [2001:888:2000:d::a6]:39272
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48790

Show key headers only | View raw


On 20 June 2013 04:11, Cameron Simpson <cs@zip.com.au> wrote:
> Also, opening-and-not-closing a set of brackets is almost the only
> way in Python to make this kind of error (syntax at one line, actual
> mistake far before).
>
> See if your editor has a show-the-matching-bracket mode.
<snip>
> 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.

Thanks for that, that's quite an ingenious technique.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Problem with the "for" loop syntax Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-20 14:39 +0100
  Re: Problem with the "for" loop syntax Neil Cerutti <neilc@norwich.edu> - 2013-06-20 13:55 +0000
    Re: Problem with the "for" loop syntax Chris Angelico <rosuav@gmail.com> - 2013-06-21 01:45 +1000
    Re: Problem with the "for" loop syntax Cameron Simpson <cs@zip.com.au> - 2013-06-21 08:38 +1000
      Re: Problem with the "for" loop syntax Neil Cerutti <neilc@norwich.edu> - 2013-06-21 14:36 +0000

csiph-web