Class BigClassA:
def __init__(self):
self.a = 3
def foo(self):
self.b = self.foo1()
self.c = self.foo2()
self.d = self.foo3()
def foo1(self):
def foo2(self):
def foo3(self):
Class BigClassB:
def __init__(self):
self.b =
self.c =
self.d =
def foo(self):
self.f = self.bar()
def bar(self):
Class BigClassC:
def __init__(self):
self.b =
self.f =
def foo(self):
self.g = self.baz()
def baz(self):
Question: Basically, I have 3 classes with a lot of methods, and they are somewhat dependent, as you can see from the code. How do I share the value of instance variables self.b, self.c, self.d from BigClassA to BigClassB?
nb: these 3 classes cannot be inherited from each other, as this does not make sense.
What I mean is simply to combine all the methods into a super large class. But I do not think that this is the right way to do this.
source
share