Python - Sintaxe???
Aparentemento tudo certo, inclusive estou acompanhando atraves de uma video aula, não consegui identificar nenhum erro.
class A():
def __init__(self):
print("init A")
super().__init__()
class B(A):
def __init__(self):
print("init B")
super().__init__()
class C(A, B):
def __init__(self):
print("init C")
super().__init__()
C()
class C(A, B):
TypeError: Cannot create a consistent method resolution
order (MRO) for bases B, A
TypeError: Cannot create a consistent method resolution
order (MRO) for bases B, A
Lucas Leitão
Curtidas 0
Respostas
Jothaz
22/12/2015
Este é todo o código?
GOSTEI 0
Lucas Leitão
22/12/2015
Sim, consegui resolver, estava errado o "Class B" sem o A:
class A():
def __init__(self):
print("init A")
super().__init__()
class B():
def __init__(self):
print("init B")
super().__init__()
class C(A, B):
def __init__(self):
print("init C")
super().__init__()
C()
GOSTEI 0