Python Attribute Error: type object has no attribute
When you assign Azog = Goblin
, you aren't instantiating a Goblin. Try Azog = Goblin()
instead.
You are not creating an instance, but instead referencing the class Goblin
itself as indicated by the error:
AttributeError: type object 'Goblin' has no attribute 'color'
Change your line to Azog = Goblin()