Class syntax


Why this error is show?


You've defined the class and Python is expecting something under it, but there is nothing. You used pass in the wrong place. What goes in the () is the class that Animal will inherit from, in Python 2 this should be object if you don't want it to inherit from any other class. The pass is what you want it to do, so it should be indented under the class:

class Animal(object):


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.