Suppose I have the following:
class A:
def __init__( self, Att):
"""here Att is a string input"""
self.Att = Att
def __repr__( self ):
s = "My attribute is " + self.Att
return s
class B:
def __init__( self, Btt):
"""here Btt is a string input"""
self.Btt = Btt
def __repr__( self ):
s = "My other attribute is " + self.Btt
return s
def SetEqual(self):
Att = self.Btt
I realize the SetEqual
method above will not work. But how might I go about creating a method in class B
that will access class A
and change the value of self.Att
to be equal to self.Btt
?