As far as I can tell, and everything I found on the Internet should work (but itβs not, so I ask here;))
class Tigon(Crossbreeds, Predator, Lion): def __init__(self): super().__init__() def printSize(self): print("Huge")
Both Crossbreeds and Predator inherit from Mammal, and Lion inherit from Predator. The compilation of these works is beautiful. I am working on Python 3.2, although I also tried before:
Edit: Sorry, part of my post failed for some reason.
I also tried:
class Tigon(Crossbreeds, Predator, Lion): def __init__(self): super(Tigon, self).__init__() def printSize(self): print("Huge")
and both of them gave me:
class Tigon(Crossbreeds, Predator, Lion): TypeError: Cannot create a consistent method resolution order (MRO) for bases Predator, Mammal, Lion
Any suggestions?
source share