Instantiating class in another file and passing variable


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}


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

This should help:

1 Like