I know this is wrong, but I don't know why, not how to do it right. I don't want myParent to be myChlid's superclass. I can't really find words to ask what I want to do so I didn't find any way to find an answer online. Maybe you can answer it :)
class myParent():
def __init__(self, whatever):
self.child = myChild(parent_ = self)
self.myVar = whatever
class myChild():
def __init__(self, parent_):
self.parent_ = parent_
print self.parent_.myVar
myParent(whatever)
It raises this error :
# AttributeError: myParent instance has no attribute 'myVar' #