Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74398
| Date | 2014-07-13 09:01 +0200 |
|---|---|
| Subject | Newbie: unexpected indenting error |
| From | Martin S <shieldfire@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11785.1405234880.18130.python-list@python.org> (permalink) |
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