Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74398
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <shieldfire@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.012 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'subject:error': 0.03; 'elif': 0.05; 'martin': 0.11; 'def': 0.12; '"unexpected': 0.16; 'accepts': 0.16; 'calculator': 0.16; 'indent': 0.16; 'unexpected': 0.16; 'coding': 0.22; 'message-id:@mail.gmail.com': 0.30; 'editor': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'first': 0.61; 'within': 0.65; 'rating': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+msz+VkKW9YbEg/08iaP1CuH2pJT4OSEPkdmRkIgnPs=; b=o3Ts/Um2Q9qZUJcHkoAGTzpE3oJ0MrS8ElJ89+Mjpv8Yl2s5FrHBvhpt7AWW8wP+ym b98oNWsrdbR6uKP6kXM1NechP9IjsIQRs4hZgGKKJn6B3JTsurqQtCtnXibCkaT/ib7e o4GzXiZKiNW2j3bPJYzzRHDe9O4mwDitc+mMdqEgohWfiHXFTtlYlJEcRDrlTwJS4FFF wuTPmOq3MLnHuyXTQtE4Nz4zAIfw9NfHc62ViJ7YQ+1eho8BwJHs5f7vfPA8OplJrixh Yf11VZ0F5eC5gcAp77mIsun4xTq4e3tnyCqnqYr6fBWqkiO7r3doSE1V22PIQxlHfipI exuQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.244.81 with SMTP id xe17mr7769527vdc.24.1405234872566; Sun, 13 Jul 2014 00:01:12 -0700 (PDT) |
| Date | Sun, 13 Jul 2014 09:01:12 +0200 |
| Subject | Newbie: unexpected indenting error |
| From | Martin S <shieldfire@gmail.com> |
| To | 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 | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11785.1405234880.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1405234880 news.xs4all.nl 2881 [2001:888:2000:d::a6]:40571 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:74398 |
Show key headers only | View raw
While coding a rating calculator I am using a for-loop within if-elif-else.
When using the for-loop in the first if instance my editor accepts
this, but when using the same for-loop within the elif instance it
complain about "unexpected indent".
Like so:
def function(x):
if rdiff >=500:
for ....
[do stuff]
elif rdiff >=410:
for ... <== unexpected indent
[do other stuff]
What the...? What am I doing wrong?
(hopefully the indents translate; else def, if/elif, for and [dostuff]
are indented)
/Martin S
--
Regards,
Martin S
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Newbie: unexpected indenting error Martin S <shieldfire@gmail.com> - 2014-07-13 09:01 +0200 Re: Newbie: unexpected indenting error Denis McMahon <denismfmcmahon@gmail.com> - 2014-07-14 00:14 +0000
csiph-web