Код: Выделить всё
class B:
def __init__(self) -> None:
something_expensive()
class C(B):
def __init__(self, b: B) -> None:
# Move b into super() ???
more_work()
Подробнее здесь: https://stackoverflow.com/questions/793 ... -in-python
Код: Выделить всё
class B:
def __init__(self) -> None:
something_expensive()
class C(B):
def __init__(self, b: B) -> None:
# Move b into super() ???
more_work()