Just like Composites, sometimes when something is inherited then all the way down in the inheritance tree everything should be included in the constructors.
class A:
def __init__(self, x, y) -> None:
self.x = x
self.y = y
class B:
def __init__(self, a, b) -> None:
self.a = a
self.b = b
class C(A, B):
def __init__(self, c, d, a, b, x, y) -> None:
self.c = c
self.d = d
A.__init__(self, x, y)
B.__init__(self, a, b)
class D(C):
def __init__(self, e, f, c, d, a, b, x, y) -> None:
super().__init__(c, d, a, b, x, y)
self.e = e
self.f = f
class E(D):
def __init__(self, g, h, e, f, c, d, a, b, x, y) -> None:
super().__init__(e, f, c, d, a, b, x, y)
self.g = g
self.h = h
class A:
def __init__(self, x, y) -> None:
self.x = x
self.y = y
class B:
def __init__(self, a, b) -> None:
self.a = a
self.b = b
@dyw.dynamize
class C(A, B):
x = dyw.inherited_field(default=1, parent=A)
y = dyw.inherited_field(default=2, parent=A)
a = dyw.inherited_field(default=10, parent=B)
b = dyw.inherited_field(default=20, parent=B)
c = dyw.field(default=100)
d = dyw.field(default=200)
@dyw.dynamize
class D(C):
e = dyw.field(default=11)
f = dyw.field(default=22)
@dyw.dynamize
class E(D):
g = dyw.field(default=111)
h = dyw.field(default=222)
This should then be similarly instantiated as the previous one.