Getting container/parent object from within python
Getting container/parent object from within python Question: In Python, is it possible to get the object, say Foo, that contains another object, Bar, from within Bar itself? Here is an example of what I mean class Foo(object): def __init__(self): self.bar = Bar() self.text = “Hello World” class Bar(object): def __init__(self): self.newText = foo.text #This is …