Newbie: unexpected indenting error
Mark Lawrence
breamoreboy at yahoo.co.uk
Sun Jul 13 05:01:23 EDT 2014
On 13/07/2014 08:01, Martin S wrote:
> 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
>
You've gone A Space Too Far.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
More information about the Python-list
mailing list