I have two classes as follows:
class Buttons():
def __init__(self, dDict):
self.TCT = Tool()
self.dDict = dDict
def btnName(self):
# I will use both self.TCT and self.dDict here
a = self.dDict['setup']
class Switch(Buttons):
def __init__(self):
self.TCT =Tool()
I need to instantiate Switch
class, but I need to provide dDict
so that Buttons
class will have the data it is looking for. What is the right way to instantiate the class Switch
?