Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74400
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: Newbie: unexpected indenting error |
| Date | 2014-07-13 10:01 +0100 |
| References | <CAHXoDSDuKsqJ7ceXoUXA3g5K9J0UNRJ7g29uJMPxZEqHQCaCnA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11787.1405242063.18130.python-list@python.org> (permalink) |
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Newbie: unexpected indenting error Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-13 10:01 +0100
csiph-web