I've got a main class that holds the program's mainloop and other variables and such.
class main:
def __init__(self):
blah = 'blah'
blah2 = 'blah'
blahhandler = BlahHandler.BlahHandler(self)
blahhandler2 = BlahHandler.BlahHandler2(self)
def mainloop(self):
< IRRELEVANT JUNK >
But is passing 'self' to the blahhandlers a bad idea, so the handlers can do stuff such as..
#In class 'BlahHandler'
self.main.blahhandler2.doBlah()
print(self.main.blah)
Or should I just pass the blahhandler2 directly to the blahhandler rather than passing the whole main class? Sorry if this is incomprehensible just because it all sounds like 'blah'.
Thanks!