Hello
I was wondering how best to instantiate an instance of a class and pass it arguments from another class/file.
I’m doing something like this:
import OtherClass
class ADict():
...
colour_dict = {"colour": "blue}
OtherClass(colour_dict).paint()
would you expect this to work?
I’m getting unexpected argument for colour_dict where:
class OtherClass():
def __init__(self, colour_dict):
self.colour_dict = colour_dict
def paint(self):
return self.colour_dict