Mar-09-2018, 08:56 PM
(This post was last modified: Mar-09-2018, 08:56 PM by 3dimensions.)
Let's say I have the following class and we know that the code is working properly:
class Test:
global_dictionary = {}
def __init__ (self):
#Initializations here
def add_to_global_dictionary (self, username):
def print_global_dictionary (self):
print (Test.global_dictionary)
test = Test()
test.add_to_global_dictionary("3dimensions"):
test.print_global_dictionary()Why is the dictionary printed like this: {'3dimensions': <__main__.Test object at 0x...>} ?
