# aaa={"1":"1","2":"2","3":"3","4": {"1": "4"}} # for i,v in aaa.items(): # if i =="4": # v["1"] = "5" # # print(aaa) class base(object): __slots__=('x') var=8 def __init__(self): pass def aa(self): print("aa") b=base() b.x=88 print(b.aa())