Class Syntax - What is going on?


Oops, try again. Did you create a class with the name Animal?
File "python", line 1
class Animal(pass):
SyntaxError: invalid syntax

class Animal(pass): 

Replace this line with your code.



class Animal(pass):

Animal inherits of object, not pass

pass should be in the object:

class Animal(object):
    # pass here, class can't be empty


Thank you, makes sense.


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