В любом случае это не относится к изначальному вопросу, а комментарии вообще не место для ответов
In [1]: a = (1, 2, 3)
In [2]: x, y = a
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[2], line 1
----> 1 x, y = a
ValueError: too many values to unpack (expected 2)
In [3]: x, y, z = a
In [4]: print(x, y, z)
1 2 3
class A:
_x = 0
def __init__(self, x):
self._x = x
def get_x(self):
return self._x
class B(A):
def __init__(self, x):
super().__init__(x)
class C:
_x = 0
def __init__(self, x):
self._x = x
def get_x(self):
return self._x
class D:
c: C
def __init__(self, c):
self.c = c
c = C(1)
d = D(c)
print(d.c.get_x())