Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74400 > unrolled thread
| Started by | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| First post | 2014-07-13 10:01 +0100 |
| Last post | 2014-07-13 10:01 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Newbie: unexpected indenting error Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-13 10:01 +0100
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-07-13 10:01 +0100 |
| Subject | Re: Newbie: unexpected indenting error |
| Message-ID | <mailman.11787.1405242063.18130.python-list@python.org> |
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
Back to top | Article view | comp.lang.python
csiph-web