class A:
diction = {}
def some(self):
global diction
diction = {"name": "some",
"id": "someid",
"prof": "somth",
}
return diction
def some1(self):
if diction["name"] == "some":
print("one")
else:
print("none")
A.some1(A)
NameError: name ‘diction’ is not defined