Is there a way to get a value from class A
assigned at runtime from class B
without passing it as as argument to the constructor? (e.g. not using new_b = B(self.value)
)
class_a.py
from class_b import B
class A():
def __init__(self, value):
self.value = value
self.load()
def load(self):
new_b = B()
class_b.py
class B():
def __init__(self):
self.value = A.value # here we should get a value from instantiating class A