[BangPypers] IndentationError: expected an indented block

Senthil Kumaran orsenthil at gmail.com
Wed Mar 11 15:26:31 CET 2009

On Wed, Mar 11, 2009 at 7:49 PM, Sandeep HS <sandeep.hs at greenturtles.in> wrote:

> IndentationError: expected an indented block

All your classes are indented wrong. As the Error message clearly says
it IS an INDENTATION Issue, that is, you have not structured the code
properly that parser can understand.

The Class should be like this:

class Name:
          def ibelongtoclass():
                 ibelongtofunction = 10

Now, if you have downloaded the python file from the internet, you
might have screwed up the indentation by opening in a non-python aware

Open it either in IDLE, PythonWin (bundled with activestate python)
and see if you code is indented properly, you should be through.


More information about the BangPypers mailing list