So I'm trying to make a basic Class function program, and I got stuck at an early phase on something weird. I have functions opening text files to create the Class objects and all, but the problem is that I can't seem to be able to call any object values. Here's the gist of how my objects are generated:
Class MyClass:
def __init__(self,val1,val2):
self.__val1 = val1
self.__val2 = val2
def main():
dict = {}
...
dict[key] = MyClass(val1, val2)
And at this point I should be able to call the object values with
dict[key].__val1
dict[key].__val2
but keep getting the error in the title.