В питонячьей секции создал класс-потомок которому перегрузил __init__ и он не хочет инициализироваться
Код
python:
class test_class0():
def __init__(self, **kwargs):
self.test0 = kwargs['test0']
class test_class1(test_class0):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.test1 = kwargs['test1']
test_obj0 = test_class0(test0 = 0)
test_obj1 = test_class1(test1 = 1, test0 = 0)
class test_class0():
def __init__(self, **kwargs):
self.test0 = kwargs['test0']
class test_class1(test_class0):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.test1 = kwargs['test1']
test_obj0 = test_class0(test0 = 0)
test_obj1 = test_class1(test1 = 1, test0 = 0)
Код
While running game code:
File "script.rpy", line 62, in script
python:
File "script.rpy", line 75, in <module>
test_obj1 = test_class1(test1 = 1, test0 = 0)
File "script.rpy", line 71, in __init__
super().__init__(**kwargs)
TypeError: super() takes at least 1 argument (0 given)
File "script.rpy", line 62, in script
python:
File "script.rpy", line 75, in <module>
test_obj1 = test_class1(test1 = 1, test0 = 0)
File "script.rpy", line 71, in __init__
super().__init__(**kwargs)
TypeError: super() takes at least 1 argument (0 given)
Добавлено (19/Авг/2022, 22:21)
---------------------------------------------