Python: How to share data between instances of different classes?
问题 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): # do some work using other methods not listed here def foo2(self): # do some work using other methods not listed here def foo3(self): # do some work using other methods not listed here Class BigClassB: def __init__(self): self.b = # need value of b from BigClassA self.c = # need value of c from BigClassA self.d = # need value of d from BigClassA def foo