IndentationError: expected an indented block

J

John Machin

Haha. How can I fix this!

Haha to you too. Position your cursor at the scene of the crime. Hit
the space-bar 4 times. Hit Ctrl-s. Try running it again.

If you would prefer a more sensible answer, you might like to ask a
more sensible question, which would include a copy/paste of the error
message plus a few lines of context.

Cheers,
John
 
H

Hendrik van Rooyen

|
| Haha. How can I fix this!
|
|
|

Use either tabs, or spaces, but not both....

- Hendrik
 
C

casioculture

Hendrik said:
|
| Haha. How can I fix this!
|
|
|

Use either tabs, or spaces, but not both....

- Hendrik

Haha. I know. I just find it silly that a language insists on
indentation. I'd long known it but just was reminded of it when I
messed a little with the interpreter.
 
G

Georg Brandl

Haha. I know. I just find it silly that a language insists on
indentation. I'd long known it but just was reminded of it when I
messed a little with the interpreter.

Let me tell you that we've had far better trolls.

Georg
 
H

Hendrik van Rooyen

| (e-mail address removed) wrote:
| > Hendrik van Rooyen wrote:
| >>
| >>
| >> |
| >> | Haha. How can I fix this!
| >> |
| >> |
| >> |
| >>
| >> Use either tabs, or spaces, but not both....
| >>
| >> - Hendrik
| >
| > Haha. I know. I just find it silly that a language insists on
| > indentation. I'd long known it but just was reminded of it when I
| > messed a little with the interpreter.
|
| Let me tell you that we've had far better trolls.
|
| Georg

*grin* - I can't complain, having trolled myself...

- Hendrik
 
Joined
Apr 5, 2008
Messages
1
Reaction score
0
sorry to bring up an old topic...but im having the same problem:

File "/usr/bin/hellagmail.py", line 79
def has_attachments(self):
^
IndentationError: unexpected indent


here is the code itself:

def get(self, key):
try: return self.msg.get(key)
except:
emsg="email_msg-Unable to get email key=%s information" % key
print emsg
sys.exit(emsg)
def has_attachments(self):
return (len(self.ATTACHMENTS) > 0)
def __iter__(self):
return self
def next(self):

there's more to it, let me know if you need more code pasted, or the entire thing. please help. thanks.

EDIT: hmm....how do i get this thing to keep the spacing?
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top