Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48864
| From | Neil Cerutti <neilc@norwich.edu> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Problem with the "for" loop syntax |
| Date | 2013-06-21 14:36 +0000 |
| Organization | Norwich University |
| Message-ID | <b2j6n2Fr5dnU1@mid.individual.net> (permalink) |
| References | <b2gfucFaqqgU1@mid.individual.net> <mailman.3642.1371769351.3114.python-list@python.org> |
On 2013-06-20, Cameron Simpson <cs@zip.com.au> wrote: > On 20Jun2013 13:55, Neil Cerutti <neilc@norwich.edu> wrote: >| On 2013-06-20, Joshua Landau <joshua.landau.ws@gmail.com> wrote: >| > 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. >| >> 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. >| >| The auto-indent feature of Vim catches this type of syntax error, >| and I imagine other good autoindent support will do the same. > > Interesting. I use autoindent but grew up with it for prose. I > hadn't realised vim's support inderstaood python indentation. > I'll have to pay more attention... A standard Vim install autoindents Python tolerably well if you've set filetype=python. If you've got a baked-in Python interpreter you can get even more bells and whistles. The standard executable installs I could find don't support Python 3, so I haven't seen all the great stuff I'm missing. -- Neil Cerutti
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll 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